WP Manifestindependent plugin directory
manifest / unclassified / font-speed-fix

Font Speed Fix

WordPress plugin: preload local WOFF2 fonts with descriptor-preserving swap and a stampede-safe scan lock

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/sirajahmadzai/font-speed-fix/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A WordPress plugin that fixes slow font loading. It preloads your local WOFF2 fonts, forces font-display: swap everywhere without breaking font descriptors, removes external Google Fonts requests when you ask it to, and uses a stampede-safe scan lock so concurrent scans never double up.

Built from real Core Web Vitals engineering at PeakSpire.

What it does

  • Local WOFF2 preloading: finds WOFF2 files referenced by your theme and plugins, then emits <link rel="preload" as="font" type="font/woff2" crossorigin> tags early in <head> so the browser fetches fonts before CSS finishes parsing. This directly attacks Largest Contentful Paint.
  • Descriptor-preserving swap: rewrites @font-face rules to add or force font-display: swap while keeping the family name, weight, style, and stretch descriptors intact, so fallback metrics and layout stay predictable.
  • Google Fonts removal: optional mode that strips enqueued Google Fonts requests and their preconnect hints, so all rendering uses your local, preloaded files.
  • Stampede lock: the asset scan runs under a mutual-exclusion lock with stale detection. Cache-warmer bots, parallel page loads, and CLI jobs cannot trigger overlapping scans or duplicate option writes.

Benchmark context

The plugin approach was validated against a field benchmark of 97 Ottawa-area business websites. Median mobile performance score was 65.5, with local-font preloading and descriptor-safe swap among the highest-yield fixes for text-heavy LCP elements. Read more at peakspire.ca.

Quick start

  1. Install the plugin:
    • Download the zip from this repository and upload it under Plugins, Add New, Upload Plugin, or
    • Install from the WordPress.org plugin directory once the submission is approved.
  2. Activate Font Speed Fix in Plugins.
  3. Open Settings, Font Speed Fix and click Scan for fonts. The scanner locates local WOFF2 files and @font-face rules on your site.
  4. Review the detected fonts, keep preload enabled, and save.
  5. Test a cached page and view source: you should see preload tags in <head> and font-display: swap in your font CSS.

No build step, no external requests, no tracking.

Requirements

  • WordPress 6.0 or newer
  • PHP 7.4 or newer

Files

  • font-speed-fix.php — main plugin: scanner, preloader, swap rewriter, Google Fonts removal, stampede lock
  • uninstall.php — cleans up options on uninstall
  • readme.txt — WordPress.org readme (changelog, FAQ)
  • assets/icon-256.png — plugin icon

License

GPL-2.0-or-later. See LICENSE. The license text was not bundled with the original plugin directory; it has been added to this repository from the canonical GNU copy.

  • PeakSpire: https://peakspire.ca/
  • WordPress.org plugin page: pending review (submitted October 31, 2025); link will be added once approved