Spark Speed: Page Cache, Performance & Core Web Vitals

By sparkcoreio

0+ active installationsVersion 0.85.4

Page cache and performance plugin that tests every optimization on your own pages first, so speed fixes never break your menus, forms or checkout.

Description

Spark Speed is a page cache and performance plugin for WordPress, built and tested on WooCommerce and Breakdance sites. Before it keeps an optimization, it checks your own pages with and without it, so faster pages never come at the cost of a broken menu, form or checkout. Everything runs on your own server, and when anything goes wrong it fails open: your site keeps working, uncached, instead of breaking.

It also supports Elementor, and recognises the hosting stack it runs on (LiteSpeed, Kinsta, Apache, nginx) so the right settings are applied on activation.

Features

  • Page cache with a drop-in that serves cached pages before WordPress loads, with separate mobile variants.
  • Smart invalidation: only the pages a change touches are purged and rebuilt, including Breakdance templates, headers, footers and global blocks, Elementor CSS regeneration, menus and WooCommerce stock changes.
  • Cache warming in the background, with priority for the pages that matter most and a safe pace on small servers.
  • HTML optimization: combined and minified CSS, unused CSS removal, critical CSS, deferred and delayed JavaScript, preloading of the LCP image and fonts.
  • Fonts: Google Fonts hosted locally, font-display and fallback metrics against layout shift.
  • Lazy loading for images, iframes and videos, with the LCP image always excluded.
  • Hosting presets applied automatically on activation (Breakdance, WooCommerce, LiteSpeed, Kinsta, Apache static serving).
  • LiteSpeed support: works next to LiteSpeed Cache, or drives the LiteSpeed server cache directly.
  • WP Grid Builder: filters shown immediately in cached pages.
  • Closed-loop optimizer that tries one optimization at a time, checks that pages still look and work the same, and keeps a full decision log with one-click undo.
  • Diagnostics: cache, server, render profile and optimization status in one place, with health checks that explain what is wrong.
  • WP-CLI commands for purging, warming and status.
  • Premium: Persistent object cache (Redis, Memcached, APCu or SQLite) with its own drop-in and cleanup; WP Grid Builder facet cache served from the object cache; AI hyper-optimization: a complete configuration proposed by Claude, via your own subscription or the API; MCP connector so Claude or ChatGPT can measure and optimize the site with the same safety gates as the dashboard; PageSpeed/Lighthouse measurement with history and verification of every change; Downloadable diagnostics report for support or AI analysis. See https://sparkcore.io/spark-speed/

Privacy

Spark Speed does not collect personal data. Only the Premium license and update check contacts SparkCore (see External services). Optional real-user measurement (RUM) is off by default and only sends anonymous timings to your own site. A small script on cached pages reports a visibly broken page (no styles, empty body) to your own site, so the cache can heal itself; it sends no personal data and nothing leaves your site.

Credits

The inline SVG icons are derived from Font Awesome Free (https://fontawesome.com), licensed under CC BY 4.0. See assets/fa-icons-LICENSE.txt.

External services

Spark Speed does not track you or your visitors. Every feature that makes your server contact a third party is off by default and only runs after you switch it on yourself. The services are listed below.

Google Fonts (option “Host Google Fonts locally”, off by default)

What and why: downloads the Google Fonts your theme already uses once, so they are then served from your own server instead of from Google on every visit.
Data sent: a request from your server to fonts.googleapis.com and fonts.gstatic.com for the font CSS and font files the page already references. No visitor data is sent. When: once per font, when the option is on and a page uses Google Fonts.
Terms: https://policies.google.com/terms Privacy: https://policies.google.com/privacy

Adobe Fonts (option “External fonts inline plus swap”, off by default)

What and why: fetches the font CSS of Adobe Fonts (use.typekit.net) that your theme already loads and inlines it with font-display:swap; the font files stay with Adobe.
Data sent: a request from your server for that CSS file, no visitor data. When: at most once a day per stylesheet, only when the option is on.
Terms: https://www.adobe.com/legal/terms.html Privacy: https://www.adobe.com/privacy.html

YouTube thumbnails (only on pages that already embed YouTube)

What and why: when a page already embeds a YouTube video, the visitor’s browser loads only the thumbnail from i.ytimg.com until they click play, instead of the full player. This sends less to YouTube than the embed the page already had.
Data sent: the visitor’s browser requests the thumbnail image (IP address and user agent, as with any image). When: on pages that embed a YouTube video.
Terms: https://www.youtube.com/t/terms Privacy: https://policies.google.com/privacy

Not external

  • Hosting cache purges (Kinsta, Varnish, LiteSpeed) are requests to your own server or your host’s internal cache endpoint, only on those hosts, to keep the host cache in step with the Spark Speed cache.
  • Cache warming, verification and diagnostics request pages of your own site.
  • The lists of third-party domains in the code (for example in the tag planner and the icon optimizer) are patterns to recognise scripts and stylesheets that your pages already load, so they can be delayed or removed. Spark Speed itself never requests those addresses.
  • The inline SVG icons are bundled with the plugin; nothing is loaded from Font Awesome.

Installation

  1. Upload and activate Spark Speed.
  2. Open Spark Speed in the admin menu. The preset for your stack is applied on activation; the page cache starts warming in the background.
  3. Check the Overview page. If the cache drop-in could not be installed (for example because wp-config.php is read-only), the page tells you the exact line to add.

FAQ

Does it work with other cache plugins?

Spark Speed never overwrites another plugin’s drop-in. With LiteSpeed Cache active it hands page caching to LiteSpeed and only delivers the optimizations.

What happens when something breaks?

Every risky optimization is verified before it is kept, and the decision log can undo any change. The emergency brake under Settings switches all caching off at once.

Which files outside its own folder does Spark Speed change?

A page cache has to run before WordPress loads, so Spark Speed writes a few standard files outside its plugin folder, the same way other cache plugins do:

  • wp-content/advanced-cache.php: the page cache drop-in. Only written when no other plugin owns it, and only removed when it carries the Spark Speed signature.
  • wp-config.php: the line define(‘WP_CACHE’, true); directly below the opening PHP tag, so WordPress loads the drop-in. If the file is not writable, the Overview page shows the line to add yourself.
  • .htaccess (Apache only): a block between # BEGIN Spark Speed and # END Spark Speed that serves cached pages without starting PHP, plus browser caching and compression rules. On LiteSpeed it only excludes logged-in users and carts from the server cache. The rest of the file is never touched.
  • wp-content/cache/spark-speed/: the cached pages, and wp-content/uploads/spark-speed/: locally hosted fonts.

Deactivating removes the drop-in, the WP_CACHE line, the .htaccess block and all scheduled tasks, and empties the cache. Deleting the plugin also removes its folders under wp-content/cache and wp-content/uploads and all of its settings. Files owned by another plugin are never changed.

What is the difference with Spark Speed Premium?

The free edition contains everything to cache and optimize a site. Premium adds the object cache, the WP Grid Builder facet cache, AI hyper-optimization, the MCP connector, PageSpeed measurement and the downloadable report. See https://sparkcore.io/spark-speed/

Screenshots

Changelog

0.85.4

  • The plugin no longer defines the WordPress constants SAVEQUERIES and AUTOSAVE_INTERVAL. The autosave interval is now set through the block editor settings filter only. The render profile counts queries per plugin through the query filter; the time per query is shown when the WordPress query log is on.
  • Security: messages and Diagnostics sub-tabs in the Spark Speed admin screens are only shown for links that carry a Spark Speed nonce, so a hand-made address can no longer put its own text in a notice.
  • Security: the background runner and the render profile send their secret token in a request header instead of in the request body or the address.
  • Security: inline CSS and JavaScript added through the WordPress enqueue API is escaped at the moment it is handed over, so a closing tag inside it cannot leave the block.
  • Read-only checks of the request (page-builder previews, cart actions, Spark’s own warm-up requests) go through one documented helper.

0.85.3

  • The page-cache card on Overview no longer shows more ready pages than the total (for example “104 / 91”). The total now counts every unique page that is cached or queued, including translated URLs another plugin adds to the queue, and Overview, Diagnostics and the admin bar use the same number.
  • The progress bars on Overview fill again.
  • Diagnostics no longer reports an idle runner longer than the 24-hour window it describes.
  • “Time ago” labels follow the site language instead of always showing Dutch.
  • Security: the folder with cached pages of logged-in customers is now closed to direct web access on Apache and LiteSpeed.
  • Security: connecting a new AI client (MCP) can no longer be blocked from outside by filling the client list with unused registrations.
  • Security: a full purge never follows a malformed host name out of the cache folder.

0.85.2

  • WebP/AVIF conversion no longer wraps images in a when a gallery script swaps them by changing the image source: the browser kept showing the first WebP, so clicking a thumbnail or arrow did nothing visible. Skipped: the FluentCart product gallery main image, images with data-default-image-url, the WooCommerce product gallery (data-large_image), and any image with data-no-picture or data-spark-no-picture. The filter spark_speed_picture_skip adds your own exclusions. The LCP preload follows the same rule, so it preloads the file the page actually shows.

0.85.1

  • Review fixes for wordpress.org: style and script tags are matched through one helper class (no tag names in comments or other files); WordPress folders come from WordPress functions (get_home_path, wp_upload_dir, wp_login_url, content_url) or one documented helper; request input is read per key and sanitized where it is read. The page-cache key reads the URL and cookies through PHP’s filter_var() in the drop-in and in the plugin alike, so both sides still build the same key. The optimizer start lock moved from wp-content to uploads/spark-speed.

0.85.0

  • Critical CSS per page template that keeps itself up to date. Instead of a fixed piece of CSS, Spark now stores a set of selectors per template (product, front page, shop, page, post, archive, other), measured in a real browser on the first screen of a few pages (tools/kritiek-scan.py, imported with wp spark-speed kritiek importeer). On every render with an external combined stylesheet Spark takes the critical CSS from the CURRENT combined CSS, inlines it and loads the full file with a preload. When the CSS changes after a plugin, theme or builder update, the critical CSS follows by itself. Unused @font-face and @keyframes rules are left out, and large embedded fonts become separate files. Without a set, or when anything goes wrong, the page stays exactly as before. On a large WooCommerce shop the product pages showed up after 2.9 s instead of 5.0 s on 4G with hand-made critical CSS; this makes that result last. Tested on that shop’s staging: first paint after the server response 1.6 s instead of 4.0 s on slow 4G, 21 KB compressed critical CSS. The size limit is checked on the compressed size (48 KB), the css_keep list is not applied to critical CSS, selectors are matched in both the browser’s and the stylesheet’s notation ([a=”x”] / [a=’x’], ::before / :before), and hidden or off-screen panels (menus, sticky bars) keep the rule that hides them.

0.84.6

  • Other plugins can no longer empty the whole PHP code cache (OPcache) after a plugin update. Google Site Kit did this after every plugin install or update, Redirection after its own update. Under visitor traffic PHP then recompiles every file on every request until the restart can run; on a large shop that pushed requests past the memory limit for up to two minutes (“critical error” for visitors). WordPress already invalidates the updated files itself.

0.84.5

  • Delayed scripts from other domains are no longer preloaded at the first interaction. A script that waits for cookie consent could otherwise already receive the visitor’s IP address through the preload, before the cookie banner could block it. Scripts from the site itself are still preloaded.

0.84.4

  • Delayed scripts that a cookie banner blocks (no consent yet) no longer hold up the loader. Before, the loader waited up to 10 seconds for a script that never loads, and clicks made in that time (also add to cart) were held until then.

0.84.3

  • Every request the plugin makes to its own pages (the LiteSpeed refresh sample, the cache check, the CLI and MCP probes) now carries a SparkSpeed marker in its user agent, so analytics plugins can leave cache warming out of their visitor counts. The mobile and desktop cache variants are unchanged.

0.84.2

  • All tags the optimizer adds to the finished page are built in one place (Paginatag), using the WordPress script tag functions where they exist.
  • Paths are resolved with the WordPress functions (wp_upload_dir, get_theme_root, WPMU_PLUGIN_DIR); local files are read through one guarded local reader.
  • The visit log is a plain .log file in a protected folder, and a taken-over drop-in is no longer kept as a .bak file.
  • Request keys and values (query, cookies, session) are sanitized before use; the admin page is printed without an output buffer.

0.84.1

  • Content above the fold with an entrance animation now stays visible through its own inline style instead of an !important stylesheet, also against very specific theme rules.
  • The free edition no longer contains the RAM cache (a cache folder outside the WordPress installation); it stays in Premium.

0.84.0

  • WordPress.org review: the page buffer uses the WordPress 6.9 template enhancement output buffer (with a closed fallback on older versions).
  • Admin CSS and JavaScript are real files loaded with wp_enqueue_style and wp_enqueue_script; no more inline blocks or HEREDOC.
  • The load plan no longer writes a mu-plugin: the page cache drop-in loads it from the plugin folder. An old Spark mu-plugin is removed on update.
  • Premium: the facet fast route no longer writes a mu-plugin either; the object cache drop-in loads it from the plugin folder.
  • Host Google Fonts locally is now off by default in every edition, and the optimizer never switches it on by itself.
  • Request values (server, cookies, query) are sanitized everywhere, also in the drop-in before WordPress loads.
  • Readme: a full External services section. The free edition ships no translation files (translate.wordpress.org provides them) and no longer calls load_plugin_textdomain.

0.83.0

  • New filter spark_speed_kritieke_css: a site can supply the CSS for the top of the page. Spark then inlines it and loads the combined stylesheet without blocking the first paint. The site ties its CSS to the combined file name, so when the CSS changes nothing is supplied and the page loads as before. Without the filter nothing changes.

0.82.0

  • After the cache is cleared, the pages and product variation links that visitors open most are rebuilt first. One in four real page views is noted in a small daily file next to the cache (kept for 14 days, never the visitor, only the address). On by default; without notes the old order stays.

0.81.0

  • New option “jQuery at the bottom of the page”: jQuery and every script that needs it move from the head to the bottom of the page, in the same order, so they no longer hold up the first paint. Off by default; not on checkout and my account.
  • New option “Gravity Forms CSS after the first paint”: the Gravity Forms stylesheets load after the page is drawn, with the form rules of later stylesheets repeated after them so forms look the same. A page with a form near the top keeps loading the CSS right away. Off by default.

0.80.2

  • Main image at the top of Elementor pages: every preloaded tile now gets high priority, not only the first. Without it, Chrome fetched the other tiles one at a time and the largest tile could arrive late.

0.80.1

  • Main image at the top of Elementor pages, after a measurement on a live site: on phones, when more than about 500 characters of visible text come before the chosen image, that text is the largest thing at the top and Spark no longer preloads an image there. The still image of a video no longer counts when it is an inline background either. When several tiles with a background sit side by side at the top, the first three are preloaded, only the first with high priority. Cards of a loop grid are not counted as tiles.

0.80.0

  • New, off by default: main image at the top of Elementor pages. Elementor puts background photos in its own CSS, where the browser finds them late. Spark now looks at the first three blocks of the page content, per screen (phone and larger, on Elementor’s own breakpoint), and preloads the background or the largest photo at the top. Images and backgrounds Elementor hides on that screen do not count, nor does the still image of a video. Nothing changes when an image is already being preloaded, or when the same photo is at the top on both screens.

0.79.1

  • “No WordPress priority below a video hero” also works when the video starts a little further down than the estimated fold, as in an Elementor hero after a large header: the video now counts when it is the first media within 64 KB after the header.

0.79.0

  • New, off by default: images in hidden Elementor blocks. An image in a block Elementor hides on some screens no longer keeps WordPress’s high priority, and an image in a block hidden on mobile gets an empty mobile source, so phones no longer download it.
  • New, off by default: Elementor loop grid backgrounds load when they come into view. The first row loads as usual; the other cards get their background image shortly before they scroll into view, after the page has loaded.
  • New, off by default: Elementor carousel arrows at their size right away, which removes the layout shift while the carousel styles load.
  • New, off by default: Elementor popups ready at start. Elementor Pro shows and removes every popup at start-up to store its markup, and the browser recalculates the page styles each time; Spark prints them already in that state.
  • New, off by default: no WordPress priority below a video hero. When the page starts with a video and no photo, the high priority WordPress gave to an image further down is removed.
  • New, off by default: prefetch links only after the page has loaded, without duplicates.

0.78.1

  • “WooCommerce files only where the shop is”: a theme class that only contains the word price or amount (such as house-price on a property card) no longer counts as shop content. On a property site every page with listing cards kept the WooCommerce scripts. Also applies to “Load CSS only where it is used”.
  • “Keep a multi-photo gallery still while it starts” now also works on product pages that Spark does not cache, for example because of a bypass rule. The style block is printed in the page head on product pages.

0.78.0

  • New, off by default: main image from the first card on listing pages. On an archive, blog or search page where nothing above the estimated fold qualifies, the photo in the first card (Elementor loop, posts widget or WooCommerce product) gets loading=”eager” and fetchpriority=”high”. On a property listing a title and filter bar of 20 KB pushed the first photo just past the estimate, so it loaded lazy. Ordinary pages with cards are left alone.
  • New, off by default: keep a multi-photo WooCommerce gallery still while it starts. The gallery slider first sets its track to several times the page width and only then sizes each slide, which measured as a layout shift of 0.6 to 0.9 on product pages. A small style block keeps the gallery at its final width and shows only the first photo until the slider has taken over.
  • New, off by default: WooCommerce files only where the shop is. The Elementor Pro cart in the header mentions prices, so “Load CSS only where it is used” kept the WooCommerce stylesheets on every page. With this option that cart no longer counts as shop content, and on pages without shop content WooCommerce’s stylesheets and scripts (add to cart, blockUI, cookies, order attribution) are left out. A WooCommerce script another script on the page depends on always stays; the list is taken from the request itself, and without it no script is removed. Order attribution then starts at the first shop visit.

0.77.3

  • Colour and size links stay warm. A cached page with a WordPress nonce may be served for about 10 hours; every hour Spark rebuilds the copies that are about to expire. For a variation link (?attribute_pa_colour=…) that hourly refresh rebuilt the plain product page instead of the variation, so the variation copy expired quietly and the next visitor, usually someone clicking an ad, waited for a full render. The refresh now rebuilds the variation itself.

0.77.2

  • LCP image after a large site header: when the header holds a big mega menu (an Elementor header of 190 KB markup, for example), the above-the-fold estimate now starts after the closing instead of at . Before, the hero on every page fell outside the estimate and stayed loading=”lazy” without a preload. After such a header only the first 8 KB counts, so a text hero does not hand the priority to a large photo further down.
  • Fonts: font-display:auto counts as no choice and becomes swap. Elementor Pro writes auto in every custom @font-face, which kept text invisible until the font had loaded. A deliberate block or optional is left alone.

0.77.1

  • Up to 30 remembered variation links per product instead of 12. A product with 5 colours and 3 sizes already has 15 combinations that visitors open, plus the size links from its categories; with 12, the visited combinations pushed the size links out and those stayed cold after the next purge. The site-wide limit of 400 is unchanged, so warming after a purge does not take longer than before.

0.77.0

  • Variation links found on cached pages are now warmed too. 0.76.0 only remembered the colour and size links that a real visitor had cached, so links from size categories (a category page linking to /product/?attribute_pa_size=160×200) stayed cold until someone clicked them. Whenever Spark writes a page to the cache (visitor, warmer or worker), it now reads the internal attribute_ links on that page, keeps the ones the cache would store itself (no cart/checkout/account rule, the attribute value exists, tracking parameters such as gclid stripped) and queues the new ones for desktop and mobile. A found link ranks below every real visit, so the variations visitors actually land on are never pushed out. Same limits as before: at most 12 per page, 400 per site, forgotten after 14 days without being found or visited. Nothing extra happens on a cache HIT.

0.76.0

  • New, on by default: WooCommerce variation links are warmed again after a purge. A product link with a chosen colour or size (?attribute_pa_colour=black&attribute_pa_size=160×200, as Google Ads and size categories use) got its own cache copy only on the first visit, and after every full purge the first visitor per variation waited for a complete render again. Spark now remembers the variation links that real visitors had cached (tracking parameters such as gclid stripped, as in the cache key) and puts them back in the warm queue after the regular pages, after a full purge and when a product is updated. Bounded: at most 12 per page and 400 per site, forgotten after 14 days without a visitor or when a warm fails. Only attribute_ links; filter facets stay first-visit. Switch off with the warm_variants setting.

0.75.0

  • Fallback font metrics are no longer wiped by every cache purge or saved page. They describe a font file, not a page, so they now stay until you forget them yourself, switch off “Host Google Fonts locally”, or the measured font file disappears (only that row goes). Before, the first saved page or “Clear cache” silently removed them and the font swap shifted the layout again.
  • Font metrics collector (tools/collect-font-metrics.mjs): variable fonts (font-weight: 100 900) are measured too, one row per weight the visible text actually uses.
  • LCP image on WooCommerce product pages: in a gallery with several photos only the main photo (the slide with the product image, otherwise the first slide) counts as LCP candidate. A larger hidden slide, such as a portrait photo further on, could win and get the priority and the preload instead of the photo visitors see. If you excluded those slides with a “Load images immediately” pattern as a workaround, you can remove that pattern now.
  • New, on by default: right-sized gallery thumbnails. The thumbnails under a WooCommerce product gallery get a realistic sizes hint (25vw up to 768 px, 150px above), so the browser downloads a small file instead of a 300 to 500 pixel one. Image files and srcset are unchanged; adjustable with the filter spark_speed_woo_thumb_sizes.
  • Premium updates show “Tested up to” again: it is read from readme.txt when the plugin header no longer has it.

0.74.7

  • LCP image: the image WordPress marks with fetchpriority=”high” is no longer passed over because a “Load images immediately” pattern happens to match it. The default list contains the word fetchpriority, which matched exactly that image; Spark then gave a lower image the priority and the preload, and took the priority away from the real hero (Elementor home page, first product image on shop pages). Patterns are now matched without the loading hints (loading, fetchpriority, decoding), unless the pattern itself contains an =. When a page builder writes its own image above the one WordPress marked, the marked image competes on display size instead of winning outright.
  • Warm-up: wp spark-speed warm --wait now really waits. It recognises another runner holding the lock (it used to stop after three rounds within a second with exit code 1) and a page builder that is rebuilding its stylesheet, and keeps going until the queue is empty or until --timeout (default 900 seconds), with a clear message and exit code 1 when time runs out. Pages refused while a stylesheet was being rebuilt get another attempt instead of dropping out of the queue.

0.74.6

  • Warm-up: URLs added to the warm-up queue by another process (for example the language variants a translation plugin queues after a full purge) are no longer lost. With a persistent object cache the warmer kept working from its own first read of the queue and wrote over those additions; every change to the queue now reads the stored queue first.

0.74.5

  • Warm-up: after a full cache purge started outside the dashboard (a translation plugin, the spark_speed_purge_all hook or a script), the warmer now checks coverage and refills the queue. Before, a small rebuild after each purge kept postponing that check, so most pages stayed cold while the status said up to date.
  • Warm-up: a failed resume check that the warmer has since disproved by rebuilding pages no longer shows as the current state, no longer marks a new pause as blocked, and no longer makes the next pause start at the longest wait.

0.74.4

  • Premium: update signatures are now checked against a new signing key and the new signed update format. Older signing keys are refused.

0.74.3

  • WP-CLI: English subcommands and actions (cart, customer-cache, load-plan, warm-resume, critical-path; test, on, off, clear, candidates, skip, load and –confirmed). The previous Dutch names keep working as aliases.
  • Diagnostics, health findings, the diagnostics report, the optimizer’s verification messages and the admin notice counter now have English source text, with the Dutch translation bundled.
  • A few error messages that mixed Dutch and English are now one translatable sentence.
  • The internal file-count statistic is stored as hex instead of base64.

0.74.2

  • Admin styles and scripts are now loaded through the WordPress style and script queues instead of inline tags.
  • Turning the page cache on and off no longer leaves empty lines in wp-config.php, and removing the WP_CACHE line can never touch another define on the same line.
  • Deactivating now also removes every scheduled task and the load plan mu-plugin; activating puts an active load plan back.
  • Uninstall also removes the render profile folder.
  • The preset name field on the Settings page is now translatable.

0.74.1

  • Translations: English source strings, bundled translations for Dutch.

0.74.0

  • New: a separate free edition for wordpress.org; premium features live in the premium edition.
  • The free edition loads no external font in the admin and never contacts the shop.

0.73.2

  • Optimization through MCP with the same safety gates as the dashboard (Premium).

0.73.1

  • Starting and resuming the optimizer without duplicate runs.

0.73.0

  • Claude and ChatGPT through MCP, with OAuth (Premium).