How Anomalies Are Detected #
The Anomaly_Detector class runs as part of the nightly metric calculation (2:00 AM WP-Cron). It checks each monitored metric for deviations from baseline.
Detection Algorithm #
For each metric:
Step 1: Calculate baseline
The baseline is the metric’s rolling average over the configured lookback window (default: last 30 days).
Step 2: Calculate standard deviation
The standard deviation measures how much the metric normally varies day-to-day.
Step 3: Check current value
Compare today’s metric value to the baseline.
Step 4: Calculate deviation
Deviation % = (Current Value – Baseline) / Baseline x 100
Step 5: Apply threshold
If the absolute deviation exceeds the configured threshold (default: 20%), an anomaly is flagged.
Severity Thresholds #
| Deviation | Severity |
|---|---|
| 20% to 35% | Low |
| 35% to 60% | Medium |
| 60% to 100% | High |
| Above 100% | Critical |
These thresholds are configurable in Analytics > Settings > Anomaly Detection.
Metrics Monitored #
By default, anomaly detection monitors:
– MRR (daily)
– Churn rate (daily)
– Download volume (daily)
– License activation count (daily)
– Revenue (daily)
You can add or remove metrics from monitoring in Analytics > Settings > Anomaly Detection.
