PHP control surface for inspecting WPGraphQL query depth, field hotspots, cacheability pressure, and release risk before a headless rollout goes sideways.
What this repo proves
WPGraphQL issues are rarely just “the server is slow.” The real problem is usually a mix of anonymous query sprawl, nested hotspot fields, weak persisted query discipline, and poor visibility into what is actually driving cost.
Headless WordPress teams often discover query cost problems too late. A pricing page pulls too many nested objects. A docs route adds answer-surface joins that blow through cacheability assumptions. Anonymous traffic ends up carrying queries that should have been split or persisted long before release.
wpgraphql-query-cost-inspector models that platform problem directly. It scores query lanes by depth, cost, payload size, latency, cacheability, and auth scope, then turns those signals into a release-friendly inspection surface.
- PHP control plane with HTML proof surfaces and JSON APIs
- sample WPGraphQL query budgets across marketing, docs, commerce, and account lanes
- field hotspot analysis for expensive nested joins
- cacheability and persisted-query posture tracking
- starter WordPress plugin export for budget headers and policy map examples
- real browser-rendered README proof assets
cd wpgraphql-query-cost-inspector
php -S 127.0.0.1:5218 router.phpOpen:
- http://127.0.0.1:5218/
- http://127.0.0.1:5218/query-matrix
- http://127.0.0.1:5218/field-hotspots
- http://127.0.0.1:5218/verification
- http://127.0.0.1:5218/docs
php -l public\index.php
php -l src\Services\QueryCostInspectorService.php
php -l src\Views\render.php
php -l plugin\wpgraphql-query-cost-inspector.php
php scripts\run_demo.php
powershell -ExecutionPolicy Bypass -File .\scripts\smoke_check.ps1
powershell -ExecutionPolicy Bypass -File .\scripts\render_readme_assets.ps1GET /api/dashboard/summaryGET /api/query-matrixGET /api/field-hotspotsGET /api/verificationGET /api/sample



