Install
Works with Drupal: ^10 || ^11Using Composer to manage Drupal site dependencies
Alternative installation files
Release notes
Phase 5 brings configurable insight thresholds, performance budgeting, dashboard intelligence,
a JSON Insight API, and full PHPUnit 11 compatibility.
✨ Configurable Thresholds
─
All rule thresholds are now editable at admin/config/system/content-telemetry
via a new ThresholdConfig service:
- Render time budget (ms) — triggers
PerformanceBudgetRule - DB ratio warn / critical thresholds (%)
- Cache-hit ratio warn / critical thresholds (%)
- Regression warn / critical thresholds (% increase vs. 7-day baseline)
Existing installs receive default values automatically via content_telemetry_update_9004().
✨ Performance Budgeting
─
New PerformanceBudgetRule flags entities whose average render time exceeds the configured budget:
- Warn: avg render ≥ budget
- Critical: avg render ≥ 2× budget
✨ DashboardtIntelligence
- Site-wide health score widget at the top of the dashboard
- Per-row Health column — colour-coded 0–100 badge derived from entity insights
- Per-row Trend column — pill badge (↑ Rising / ↑ Critical / → Stable) derived from regression rule hits
✨ Insight Scoring
─
Every insight now carries a numeric score (0–100, higher = worse). Entity and site-wide health
scores are derived by deducting penalty points per severity:
- poor insight: −30 points
- warn insight: −15 points
Score labels: Good (80–100) · Needs attention (50–79) · Critical (0–49)
✨ JSON Insight API
─
Two new JSON endpoints (requires view content telemetry permission):
GET /api/content-telemetry/insights/{entity_type}/{entity_id}GET /api/content-telemetry/insights/dashboard
Response includes generated_at, health_score, health_label,
insight_count, and insights[]. All responses carry Cache-Control: no-store, private.
🐛 Bug Fixes
- Fixed
BlockSubscriberTypeError caused by stale@plugin.manager.blockargument inservices.yml - Fixed
formatMs()TypeError — database string values now explicitly cast tofloat - Fixed trend HTML rendering as escaped text instead of markup
- Fixed duplicate health score appearing on the dashboard overview
🎨 UI Improvements
- Trend indicators replaced with styled pill badges using
.ctpi-trend-pillCSS classes, each with a tooltip carrying the full insight message - New CSS modifier classes:
.ctpi-badge--good,.ctpi-badge--warn,.ctpi-badge--poor
🧪 PHPUnit 11 Compatibility─
- All 12 test classes migrated from docblock annotations to PHP 8 attribute syntax (
#[CoversClass],#[Group]) - All
setAccessible(true)calls removed (no-op since PHP 8.1) - 94 PHPUnit 11 deprecation warnings eliminated — now 0
- New test classes:
PerformanceBudgetRuleTest,InsightServiceScoringTest,ThresholdConfigTest