Skip to content

Surface archival readiness alert on dashboard when QET threshold is crossed #28

Description

@Ajay-Singh-Adhikari

Context

Step 1 (data collection — #15, #20) and Step 2 (configurable threshold — #27) together give the plugin everything it needs to evaluate archival readiness automatically. Step 3 is making that evaluation visible without requiring the engineer to manually inspect the numbers.

Problem

Even with Current QET and Baseline QET visible on the dashboard, an engineer still has to open the page, read both numbers, and decide. If nobody is watching — which is the normal state for a client site between engagements — the degradation goes unnoticed until a performance complaint surfaces.

The plugin needs to surface the signal proactively. The engineer should not have to derive the conclusion from raw numbers; the dashboard should state it directly.

What to build

1. Dashboard status indicator

Add a clear archival readiness badge to the WooCommerce Order Metrics section:

State Indicator
Threshold not configured No badge — raw numbers only
Current QET ≤ threshold DB health: OK
Current QET > threshold AND orders older than retention window > 0 ⚠️ Archival recommended

The badge should be immediately visible without scrolling — the engineer opens the dashboard and sees the status at a glance.

2. WP Admin notice (optional, lower priority)

When the archival signal is active, show a persistent WP Admin notice on ProPerf pages so the signal is visible even without opening the full dashboard.

What the signal means and does NOT mean

The alert means: the QET query is running slower than the configured acceptable ceiling AND there are orders old enough to be archival candidates. Together, these suggest that archiving old orders is likely to improve query performance.

The signal does not trigger archival automatically. Archival modifies production data and requires human sign-off. The plugin's job is to make the recommendation obvious — the engineer takes action.

Dependency

This issue depends on #27 (configurable QET threshold). The alert logic cannot be implemented until the threshold field exists.

Acceptance criteria

  • Dashboard shows an archival readiness status badge in the WooCommerce Order Metrics section
  • Badge is absent when no threshold is configured
  • Badge shows "DB health: OK" (green) when current QET ≤ threshold
  • Badge shows "Archival recommended" (warning/amber) when current QET > threshold AND orders_older_than_threshold > 0
  • Badge evaluates against the cached snapshot (not a fresh live query) so it does not add DB load on dashboard load
  • Status is consistent with what BigQuery data shows — no discrepancy between dashboard and Looker Studio

Related

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions