Capo – Head Optimizer
Capo – Head Optimizer

Capo – Head Optimizer

0/5 (0 ratings) 10 active installs Updated Aug 24, 2026
Capo reordering status visible in WordPress Site Health diagnostics.

Capo reordering status visible in WordPress Site Health diagnostics.

In standard WordPress sites, WordPress Core, themes, SEO plugins, analytics scripts, and third-party plugins inject elements into wp_head() in arbitrary order. This can lead to critical performance pitfalls:

  • Delayed Title Tag Rendering: SEO metadata and large JSON-LD blocks placed before <title>.
  • Delayed Resource Discovery: Preconnects, preloads, and async scripts pushed below dozens of CSS stylesheets.
  • Render-Blocking Bottlenecks: External synchronous scripts blocking CSS and parser execution.

Capo solves this automatically. By intercepting the page response via output buffering, Capo uses a deterministic, stable sorting algorithm to reorder <head> elements strictly according to browser critical rendering path priorities.

The Capo Head Priority Spectrum

Capo organizes elements into 11 strict priority tiers (Weight 10 down to 0):

  1. Weight 10 (Critical Meta & Viewport): <base>, <meta charset>, <meta name="viewport">, critical http-equiv headers (CSP, origin-trial, accept-ch).
  2. Weight 9 (Title): <title>.
  3. Weight 8 (Critical Resource Hints): <link rel="preconnect">, <link rel="preload" fetchpriority="high">, <link rel="modulepreload" fetchpriority="high">.
  4. Weight 7 (Async Script): <script src="..." async>.
  5. Weight 6 (CSS @import Styles): <style> blocks containing @import rules.
  6. Weight 5 (Sync / Inline Scripts): Synchronous/inline JavaScript (<script> without defer/async).
  7. Weight 4 (Stylesheets & Style Blocks): <link rel="stylesheet">, <style> blocks.
  8. Weight 3 (Standard Preload): <link rel="preload">, <link rel="modulepreload"> (without fetchpriority="high").
  9. Weight 2 (Defer Script): <script src="..." defer>, <script src="..." type="module">.
  10. Weight 1 (Prefetch / Prerender): <link rel="prefetch">, <link rel="dns-prefetch">, <link rel="prerender">, <script type="speculationrules">.
  11. Weight 0 (Other Metadata): OpenGraph, Twitter cards, Schema JSON-LD, RSS feeds, favicons, robots metadata.

Features

  • Zero Configuration: Activate the plugin and your <head> is immediately optimized.
  • Deterministic Stable Sort: Equal-weight elements retain their exact relative order, preserving CSS cascade specificity and JavaScript dependencies.
  • Full Cache Compatibility: Works seamlessly with WP Super Cache, W3 Total Cache, WP Rocket, LiteSpeed Cache, and Cloudflare.
  • Safe HTML Tokenizer: Respects HTML comments, conditional comments (<!--[if ...]>), CDATA blocks, and inline script markup.
  • Site Health & Admin Diagnostics: Real-time <head> hygiene warnings and diagnostic status in Tools > Site Health and Admin Toolbar.
  • Testing & Bypass Mode: Append ?capo=off to any frontend URL to inspect the un-reordered head.