Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
wordpress avatar

Wp Performance

  • 3.3k installs
  • 1.9k repo stars
  • Updated July 27, 2026
  • wordpress/agent-skills

wp-performance is an agent skill that profiles and optimizes slow WordPress backends using WP-CLI doctor and profile, Query Monitor REST headers, and targeted fix playbooks.

About

wp-performance is a backend-only WordPress agent skill for investigating and improving site performance on WordPress 6.9 plus with PHP 7.2.24 or newer. It prefers WP-CLI doctor and profile commands, Server-Timing headers, and Query Monitor data via REST response headers when browser UI is unavailable. The procedure starts with guardrails to measure first, confirm write permissions, and capture baselines with curl TTFB or wp profile before changes. perf_inspect.mjs detects WP-CLI availability, core version, doctor and profile support, autoloaded options size, and object-cache drop-in presence. Fast wins run wp doctor check before deep wp profile stage, hook, and eval profiling. Fix categories target database queries, autoloaded options, object cache misses, remote HTTP API calls, and cron spikes with reference guides per bottleneck. Query Monitor can be used headlessly via authenticated REST x-qm headers and _envelope responses. WordPress 6.9 notes cover on-demand CSS for classic themes and zero render-blocking block themes. Developers reach for wp-performance when admin, REST, cron, or TTFB paths are slow and they need a reproducible backend profiling plan.

  • Backend-only workflow using WP-CLI doctor, profile, curl baselines, and REST header observability.
  • perf_inspect.mjs script detects CLI availability, autoload size, and object-cache drop-in status.
  • Profiling order runs wp profile stage, hook, and eval before choosing a dominant bottleneck category.
  • Fix playbooks cover database queries, autoloaded options, object cache, HTTP API calls, and cron.
  • Query Monitor usable headlessly via authenticated REST x-qm headers and _envelope qm payloads.

Wp Performance by the numbers

  • 3,333 all-time installs (skills.sh)
  • +197 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #48 of 1,453 DevOps & CI/CD skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

wp-performance capabilities & compatibility

Capabilities
wp cli doctor and profile orchestration · autoloaded options and object cache diagnosis · headless query monitor rest header analysis · bottleneck specific fix and verification playboo
Use cases
debugging · api development
From the docs

What wp-performance says it does

This skill assumes the agent cannot use a browser UI. Prefer WP-CLI, logs, and HTTP requests.
SKILL.md
npx skills add https://github.com/wordpress/agent-skills --skill wp-performance

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs3.3k
repo stars1.9k
Security audit3 / 3 scanners passed
Last updatedJuly 27, 2026
Repositorywordpress/agent-skills

Why is my WordPress admin, REST endpoint, or TTFB slow and which backend bottleneck should I fix first without using a browser?

Systematically diagnose and optimize slow WordPress sites using WP-CLI, query monitoring, and backend profiling without touching the browser UI.

Who is it for?

WordPress operators with WP-CLI access who need backend profiling for slow TTFB, admin, REST, or cron paths.

Skip if: Skip when you lack WP-CLI or server access or when the task is purely frontend design without PHP or database tuning.

When should I use this skill?

User investigates WordPress slowness, wp doctor, wp profile, autoloaded options, object cache, or Query Monitor REST headers.

What you get

A measured performance report, dominant bottleneck category, applied fixes, and repeated verification on the same URL or route.

  • profiling plans
  • query optimization fixes
  • caching recommendations

By the numbers

  • Targets WordPress 6.9+
  • Requires PHP 7.2.24+

Files

SKILL.mdMarkdownGitHub ↗

WP Performance (backend-only)

When to use

Use this skill when:

  • a WordPress site/page/endpoint is slow (frontend TTFB, admin, REST, WP-Cron)
  • you need a profiling plan and tooling recommendations (WP-CLI profile/doctor, Query Monitor, Xdebug/XHProf, APMs)
  • you’re optimizing DB queries, autoloaded options, object caching, cron tasks, or remote HTTP calls

This skill assumes the agent cannot use a browser UI. Prefer WP-CLI, logs, and HTTP requests.

Inputs required

  • Environment and safety: dev/staging/prod, any restrictions (no writes, no plugin installs).
  • How to target the install:
  • WP root --path=<path>
  • (multisite/site targeting) --url=<url>
  • The performance symptom and scope:
  • which URL/REST route/admin screen
  • when it happens (always vs sporadic; logged-in vs logged-out)

Procedure

0) Guardrails: measure first, avoid risky ops

1. Confirm whether you may run write operations (plugin installs, config changes, cache flush). 2. Pick a reproducible target (URL or REST route) and capture a baseline:

  • TTFB/time with curl if possible
  • WP-CLI profiling if available

Read:

  • references/measurement.md

1) Generate a backend-only performance report (deterministic)

Run:

  • node skills/wp-performance/scripts/perf_inspect.mjs --path=<path> [--url=<url>]

This detects:

  • WP-CLI availability and core version
  • whether wp doctor / wp profile are available
  • autoloaded options size (if possible)
  • object-cache drop-in presence

2) Fast wins: run diagnostics before deep profiling

If you have WP-CLI access, prefer:

  • wp doctor check

It catches common production foot-guns (autoload bloat, SAVEQUERIES/WP_DEBUG, plugin counts, updates).

Read:

  • references/wp-cli-doctor.md

3) Deep profiling (no browser required)

Preferred order:

1. wp profile stage to see where time goes (bootstrap/main_query/template). 2. wp profile hook (optionally with --url=) to find slow hooks/callbacks. 3. wp profile eval for targeted code paths.

Read:

  • references/wp-cli-profile.md

4) Query Monitor (backend-only usage)

Query Monitor is normally UI-driven, but it can be used headlessly via REST API response headers and _envelope responses:

  • Authenticate (nonce or Application Password).
  • Request REST responses and inspect headers (x-qm-*) and/or the qm property when using ?_envelope.

Read:

  • references/query-monitor-headless.md

5) Fix by category (choose the dominant bottleneck)

Use the profile output to pick one primary bottleneck category:

  • DB queries → reduce query count, fix N+1 patterns, improve indexes, avoid expensive meta queries.
  • references/database.md
  • Autoloaded options → identify the biggest autoloaded options and stop autoloading large blobs.
  • references/autoload-options.md
  • Object cache misses → introduce caching or fix cache key/group usage; add persistent object cache where appropriate.
  • references/object-cache.md
  • Remote HTTP calls → add timeouts, caching, batching; avoid calling remote APIs on every request.
  • references/http-api.md
  • Cron → reduce due-now spikes, de-duplicate events, move heavy tasks out of request paths.
  • references/cron.md

6) Verify (repeat the same measurement)

  • Re-run the same wp profile / wp doctor / REST request.
  • Confirm the performance delta and that behavior is unchanged.
  • If the fix is risky, ship behind a feature flag or staged rollout when possible.

WordPress 6.9 performance improvements

Be aware of these 6.9 changes when profiling:

On-demand CSS for classic themes:

  • Classic themes now get on-demand CSS loading (previously only block themes had this).
  • Reduces CSS payload by 30-65% by only loading styles for blocks actually used on the page.
  • If you're profiling a classic theme, this should already be helping.

Block themes with no render-blocking resources:

  • Block themes that don't define custom stylesheets (like Twenty Twenty-Three/Four) can now load with zero render-blocking CSS.
  • Styles come from global styles (theme.json) and separate block styles, all inlined.
  • This significantly improves LCP (Largest Contentful Paint).

Inline CSS limit increased:

  • The threshold for inlining small stylesheets has been raised, reducing render-blocking resources.

Reference: https://make.wordpress.org/core/2025/11/18/wordpress-6-9-frontend-performance-field-guide/

Verification

  • Baseline vs after numbers are captured (same environment, same URL/route).
  • wp doctor check is clean (or improved) when applicable.
  • No new PHP errors or warnings in logs.
  • No cache flush is required for correctness (cache flush should be last resort).

Failure modes / debugging

  • “No change” after code changes:
  • you measured a different URL/site (--url mismatch), caches masked results, or opcode cache is stale
  • Profiling data is noisy:
  • eliminate background tasks, test with warmed caches, run multiple samples
  • SAVEQUERIES/Query Monitor causes overhead:
  • don’t run in production unless explicitly approved

Escalation

  • If this is production and you don’t have explicit approval, do not:
  • install plugins, enable SAVEQUERIES, run load tests, or flush caches during traffic
  • If you need system-level profiling (APM, PHP profiler extensions), coordinate with ops/hosting.

Related skills

FAQ

What script starts a backend-only WordPress performance inspection?

Run node skills/wp-performance/scripts/perf_inspect.mjs --path=<path> with optional --url for multisite targeting.

What profiling order does wp-performance recommend?

wp doctor check first, then wp profile stage, hook, and eval before picking one primary bottleneck category to fix.

Is Wp Performance safe to install?

skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

DevOps & CI/CDbackenddevopsintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.