跳到内容

Peakspire Font Loading Optimizer

v1.2.0

PeakSpire · 2026年11月8日 上架

Preloads self-hosted WOFF2 fonts from enqueued stylesheets, adds font-display swap, and optionally removes Google Fonts and guest dashicons.

正在使用
10 以下
评分
暂无
累计下载
444
最近更新
2026年11月15日
需要 WordPress 6.9+已测试到 7.1.5PHP 7.4+

贡献者

截图

Settings screen - Status scan table, Re-scan button, and all four font fixes with sensible defaults.
Settings screen - Status scan table, Re-scan button, and all four font fixes with sensible defaults.
Preload tags in the page source - local WOFF2 fonts preloaded in the head ahead of stylesheet parsing, on a theme that enqueues fonts from an external stylesheet.
Preload tags in the page source - local WOFF2 fonts preloaded in the head ahead of stylesheet parsing, on a theme that enqueues fonts from an external stylesheet.
font-display: swap injected into an inline @font-face rule that previously shipped no font-display descriptor.
font-display: swap injected into an inline @font-face rule that previously shipped no font-display descriptor.

Font loading is one of the largest contributors to Largest Contentful Paint (LCP) on real websites. Peakspire Font Loading Optimizer applies the three highest-impact font fixes, built from hands-on Core Web Vitals engineering on production sites:

  1. Preload local WOFF2 fonts – Scans your enqueued stylesheets for locally hosted WOFF2 files and adds <link rel="preload"> tags, capped at 4 fonts. Preloaded fonts arrive before the browser discovers them inside CSS files, removing the font round-trip from the critical path.

  2. Adds font-display: swap to eligible inline @font-face rules – Rules that already declare an explicit optional, block, fallback, or auto value are never touched. Rules without a descriptor get swap, so text renders immediately with the fallback font instead of sitting invisible while web fonts download.

  3. Remove external Google Fonts (optional) – Dequeues all fonts.googleapis.com requests for sites that have self-hosted their fonts.

  4. Remove dashicons for visitors (optional) – Dequeues the dashicons stylesheet for logged-out visitors, saving a render-blocking request most themes never use on the front end.

Everything is front-end only and safe to use alongside caching plugins (WP Rocket, LiteSpeed Cache, W3 Total Cache, etc.).

Why only local fonts are preloaded

Cross-origin font preloads waste bandwidth when the crossorigin fetch does not match the stylesheet fetch. This plugin deliberately preloads only same-host WOFF2 files, the safe default for virtually all themes that self-host fonts.

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums