Title: Peakspire Font Loading Optimizer
Author: PeakSpire
Published: <strong>November 8, 2026</strong>
Last modified: November 8, 2026

---

Search plugins

![](https://ps.w.org/peakspire-font-loading/assets/banner-772x250.png?rev=3790530)

![](https://ps.w.org/peakspire-font-loading/assets/icon-256x256.png?rev=3790631)

# Peakspire Font Loading Optimizer

 By [PeakSpire](https://profiles.wordpress.org/peakspire/)

[Download](https://downloads.wordpress.org/plugin/peakspire-font-loading.1.0.5.zip)

 * [Details](https://wordpress.org/plugins/peakspire-font-loading/#description)
 * [Reviews](https://wordpress.org/plugins/peakspire-font-loading/#reviews)
 *  [Installation](https://wordpress.org/plugins/peakspire-font-loading/#installation)
 * [Development](https://wordpress.org/plugins/peakspire-font-loading/#developers)

 [Support](https://wordpress.org/support/plugin/peakspire-font-loading/)

## Description

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.

## Installation

 1. Upload the `peakspire-font-loading` folder to `/wp-content/plugins/`, or install
    via the Plugins screen.
 2. Activate the plugin.
 3. Open Settings  Peakspire Font Loading Optimizer. Preload and font-display are on
    by default; both are recommended.

## FAQ

### Which fonts does this preload?

WOFF2 files hosted on your own domain that are referenced from enqueued external
stylesheets, up to a static maximum of 4 per page. Fonts declared inline in the 
HTML head are deliberately NOT preloaded: the browser already discovers those at
parse time, so preloading them adds bandwidth cost without benefit (measured: a 
~0.9s LCP regression on an inline-declaring theme before this rule was enforced).
This is a deliberate simplicity tradeoff: the plugin does not measure per-page font
relevance (paid performance suites do). For most sites with 2-4 font families, the
cap is the right size.

### Does this replace a font-localization plugin like OMGF?

No – it complements one. Localization plugins handle fonts sourced from Google/Bunny
CDNs. This plugin handles the other half: the fonts your theme or builder already
bundles locally. Use both if you have both.

### Does this work with caching plugins?

Yes. All changes are front-end output (preload tags and CSS descriptor injection).
Nothing modifies your theme files or cache behavior.

### Which fonts get preloaded?

Only WOFF2 files hosted on your own domain that are referenced from your enqueued
stylesheets, up to a maximum of 4. Preloading more fonts typically hurts more than
it helps.

### What if my fonts come from Google Fonts?

Enable the “Remove external Google Fonts” option only after self-hosting your fonts.
Sites not ready for that step should leave it off.

### Is the font-display change safe for my design?

font-display: swap shows the fallback font until your web font loads, then swaps.
It is the descriptor Google recommends and the default in most modern themes.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“Peakspire Font Loading Optimizer” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ PeakSpire ](https://profiles.wordpress.org/peakspire/)

[Translate “Peakspire Font Loading Optimizer” into your language.](https://translate.wordpress.org/projects/wp-plugins/peakspire-font-loading)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/peakspire-font-loading/),
check out the [SVN repository](https://plugins.svn.wordpress.org/peakspire-font-loading/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/peakspire-font-loading/)
by [RSS](https://plugins.trac.wordpress.org/log/peakspire-font-loading/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.3

 * Discovery prioritization: same-host stylesheets scanned first; CDN-hosted stylesheets
   no longer consume scan slots (they cannot yield same-host WOFF2 URLs)
 * Real-theme tested on Twenty Twenty-Four: external CSS fonts correctly preloaded,
   inline declarations correctly skipped
 * PHP 7.4 literal execution verified (Docker php:7.4-cli, lint + token scan)

#### 1.0.2

 * Security hardening: SSRF defense (private/loopback/link-local IP deny-list before
   fetch), cache-hit re-validation (same-host + is_string on every cached entry),
   corrupt-lock-value recovery (stale-reclaimable, not live-forever)
 * Availability: preg_replace NULL guard on backtrack-limit exhaustion (never blanks
   a page)
 * CSS correctness: @font-face rewrite scoped to
 * Measured: zero LCP regression on inline-font themes; preload timing verified 
   on external-CSS pages

#### 1.0.0

 * Initial release: WOFF2 preload discovery, global font-display:swap injection,
   optional Google Fonts removal, optional dashicons removal for guests.

## Meta

 *  Version **1.0.5**
 *  Last updated **9 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.9 or higher **
 *  Tested up to **7.1.4**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [fonts](https://wordpress.org/plugins/tags/fonts/)[google fonts](https://wordpress.org/plugins/tags/google-fonts/)
   [performance](https://wordpress.org/plugins/tags/performance/)[preload](https://wordpress.org/plugins/tags/preload/)
   [speed](https://wordpress.org/plugins/tags/speed/)
 *  [Advanced View](https://wordpress.org/plugins/peakspire-font-loading/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/peakspire-font-loading/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/peakspire-font-loading/reviews/)

## Contributors

 *   [ PeakSpire ](https://profiles.wordpress.org/peakspire/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/peakspire-font-loading/)