Linux 软件免费装
Banner图

Capo - Head Optimizer

开发者 rviscomi
更新时间 2026年8月20日 01:25
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

speed performance seo head web-vitals

下载

0.1.3

详情介绍:

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: 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 (Preconnect): <link rel="preconnect">.
  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 (Preload): <link rel="preload">, <link rel="modulepreload">.
  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

安装:

  1. Upload the plugin files to the /wp-content/plugins/capo-head-optimizer directory, or install the plugin through the WordPress plugins screen directly.
  2. Activate the plugin through the Plugins screen in WordPress.
  3. If you use a page caching plugin (e.g. WP Super Cache, WP Rocket), clear/flush your cache.

屏幕截图:

  • Debug performance metrics comment in HTML source code.

升级注意事项:

0.1.3 Adds Speculation Rules API classification, tokenizer robustness for conditional comments/CDATA/quoted attributes, Admin Bar security hardening, and parity with capo.js v2.2.1. 0.1.2 Adds full WordPress.org directory compliance, opt-in debug comments, uninstall cleanup, and PHP 7.4 compatibility improvements. 0.1.1 Includes validation engine, Admin Toolbar live diagnostics, and enhanced Site Health inspection.

常见问题:

Does Capo break script dependencies or stylesheet cascading?

No. Capo uses a deterministic stable sort. If you have multiple stylesheets (all Weight 4) or multiple scripts (all Weight 5), they will maintain their exact original relative order.

Does Capo work with page caching plugins?

Yes. Page caching plugins capture the output buffer generated by WordPress. With Capo activated, the cached HTML stored on disk or in memory will already have its <head> sorted, incurring 0ms runtime overhead for cached visitors.

How can I test the difference?

You can view any page with ?capo=off appended to the URL to bypass reordering and compare your raw <head> output against the optimized output.

更新日志:

0.1.3 0.1.2 0.1.1 0.1.0