---
title: "Lightweight WordPress Popup Plugin, About 11 KB – Modal Kit"
description: "Modal Kit adds about 11 KB, only on pages that show a modal. Triggers load on demand, and opening a modal never asks WordPress for anything."
language: "en-US"
canonical_url: "https://modalkitwp.com/performance/"
source_url: "https://modalkitwp.com/performance/"
content_type: "text/markdown"
---

Performance

# About 11 KB, and only *where* a modal is.

Modal Kit adds its stylesheet and script to pages that show a modal, and nothing to the rest. Each trigger loads when a modal uses it, and the browser’s own dialog handles focus and layering. Opening a modal never asks WordPress for anything, so page caches and static exports keep working.

[Download free](https://packages.cocartheadless.com/download/latest/modal-kit.zip)

[See the cache plugin tests](#caching)

0 KB

**On pages without a modal**

Nothing is added until a modal is set to show on the page.

11.0 KB

**For one modal, gzipped**

Stylesheet, runtime and a trigger. 9.5 KB with Brotli.

0

**Requests to WordPress**

Opening, showing and closing all happen in the browser.

0

**Layout shift when one opens**

Overlay, bar and corner layouts open over the page. Inline modals sit in your content.

What loads

## Every file, and when it loads

Sizes are from the release build, in KB. Most hosts send files compressed with gzip or Brotli, so those are the sizes a visitor downloads. A page only gets the rows that apply to the modals on it.


					Free · 6
					Pro · 13



File

Loads when

Raw

Gzip

Brotli

**Modal stylesheet**

A modal is on the page. Every layout and the three fixed styles, with colours, fonts and spacing from your theme.

24.6

4.7

4.1

**Runtime**

A modal is on the page. Opening, closing, focus, links, rules and frequency.

14.6

5.9

5.2

**Theme colour values**

A modal is on the page, printed inline.

0.4

0.2

–

**One trigger**

A modal on the page uses it: load, scroll, leaving the page, time on site, inactivity, URL or element.

0.2–0.8

0.2–0.4

0.1–0.4

**Video player**

A modal has a video, or a link plays one in the lightbox.

4.9

2.1

1.8

**Fixed-style fonts**

A modal uses Fieldnote, Harbor or Night: a 2.3 KB font stylesheet, then only the font files the page uses, 14–30 KB each.

2.3

0.6

0.5

**One modal comes to about 11 KB.**

The stylesheet, the runtime, the theme values and a load trigger add up to 11.0 KB gzipped, or 9.5 KB with Brotli. A second modal on the same page adds its own markup and nothing else.

Modals run on the Interactivity API that ships with WordPress (15 KB gzipped). Core blocks such as Navigation, Search and Image lightboxes use it too, so many pages already load it.



File

Loads when

Raw

Gzip

Brotli

**Games**

A prize wheel, scratch card, pick a gift or slot reel is on the page. One stylesheet for all four.

24.0

7.9

6.9

**Forms**

A form is on the page, bot checks included. The provider’s own script loads when the form scrolls into view.

11.9

4.4

3.9

**WooCommerce**

A modal uses quick view, cart offers, shop triggers or the cart summary.

10.9

4.3

3.7

**Results**

Counting is switched on in Settings → Results.

4.9

2.1

1.8

**A/B testing**

A modal on the page has a test running.

2.0

1.0

0.9

**Age gate**

An age gate is on the page.

6.6

2.5

2.2

**Audience rules**

A modal uses new or returning visitors, referrer, cookie or time-of-day rules.

3.6

1.7

1.5

**Carousel**

A Carousel block is in a modal.

4.8

2.1

1.8

**Multi-step**

A modal has steps.

3.5

1.5

1.3

**Teaser**

A modal has a teaser.

4.9

1.5

1.3

**Countdown**

A Countdown block is in a modal.

1.5

0.9

0.7

**Motion**

A modal uses entrances, text animation, Ken Burns or parallax.

2.4

0.9

0.8

**Reviews**

A Reviews block is in a modal. Stylesheet only.

1.6

0.6

0.5

**Pro adds a file per feature, where it’s used.**

Sizes are each feature’s script and stylesheet together, on top of the free plugin. A page with a sign-up form and multi-step comes to about 16.9 KB gzipped, everything included.

Third-party scripts aren’t counted: the bot check provider (Turnstile, hCaptcha or reCAPTCHA) and any analytics service you connect in Settings → Results.



How it stays light

## The browser does the heavy lifting

**Printed only where it shows**

Page targeting is settled before the page is sent. A modal set to show on your shop prints there and nowhere else, and a page with no modals gets no Modal Kit files.

**Triggers load on demand**

Each trigger is its own small file, imported when a modal on the page uses it. A modal that opens from a link loads none.

**The browser’s own dialog**

Modals are native <dialog> elements. The browser puts them above the page, makes the page behind inert and handles Esc, so there’s no focus-trap or overlay library to download.

**Your theme’s styles, not ours**

Native, Soft and Editorial use your theme.json colours, fonts and spacing, so no extra fonts load. The fixed styles bring their own fonts, served from your site, never Google Fonts.

**No requests, no cookies**

Frequency, device, schedule and visitor rules run in the browser, and what a visitor has seen is kept in localStorage. Nothing reaches WordPress or sets a cookie, so cached pages stay cached.

**Pro loads per feature**

Games, forms, steps and the rest each load only where they’re used. A bot check’s provider script waits until its form scrolls into view.

Page caches

## Tested with 13 cache and speed plugins

Each plugin was switched on with everything it can do without an account: page cache, minify and combine CSS and JavaScript, defer, delay until interaction, lazy-load and HTML minify, plus LiteSpeed’s Guest Mode and the CDNs of W3 Total Cache and Breeze. A logged-out visitor then went through cached pages with free and Pro modals, compared with screenshots taken without the plugin.

Pages came from the plugin’s cache, where it has one

A link opens its modal, and focus moves in and back on close

An image in a modal loads through the lazy-loader

Scrolling opens a corner modal without taking focus

An overlay opens on load in a fixed style, with its fonts

A first visit counts as one page view

A bar opens on load and keeps its layout

Each modal looks as it does without the plugin

Pro: a form sent through the site, a game drawn on the server, steps and a teaser

No browser console errors and no failed requests

Plugin

Version

Result

What it did, and notes

**WP Rocket**

3.23.5.1

Works, see notes

Page cache, minify, defer, delay JavaScript and lazy-load. With delay on, a modal set to open by itself waits for the visitor’s first move or tap, while links and buttons open straight away. Excluding Modal Kit from delay (see Settings) opens them at once. With delay off, combined JavaScript works too.

**LiteSpeed Cache**

7.9.2

Works

Minify and combine CSS and JavaScript, delay JavaScript, HTML minify and lazy-load, with modals opening straight away. Guest Mode reloads a visitor’s first page once; Modal Kit waits for that, so the visit counts once and a modal opens once.

**W3 Total Cache**

2.11.0

Works

Page cache, minify and combine CSS and JavaScript with non-blocking defer, HTML minify and lazy-load. The fixed styles keep their fonts in the combined CSS. With its CDN on, Modal Kit keeps its scripts and WordPress’s script modules on your site: browsers refuse modules from a CDN that doesn’t allow your site, and no modal opened before.

**WP Super Cache**

3.1.4

Works

Page cache. Every page came from the cache.

**WP Fastest Cache**

1.5.3

Works

Page cache, minify HTML and CSS, combine CSS and JavaScript: everything in the free version.

**WP-Optimize**

4.7.0

Works, see notes

Page cache, minify and merge CSS and JavaScript, defer and delay JavaScript. As with WP Rocket, delay holds back modals that open by themselves until the visitor moves, and the exclusion in Settings opens them at once.

**Autoptimize**

3.1.17

Works

Aggregated and deferred CSS and JavaScript, inline code included, HTML minify and lazy-load. It has no page cache of its own.

**Hummingbird**

3.21.2

Works

Compressed and combined CSS and JavaScript, with every script deferred.

**Breeze**

2.6.3

Works, see notes

Page cache, minify and group CSS and JavaScript, delay all JavaScript, and its CDN: every modal works. As with W3 Total Cache, Modal Kit keeps its scripts off the CDN. With delay all JavaScript and Breeze’s own lazy-load both on, its lazy-loader never starts, so lazy images stay blank across the whole page, in modals or not.

**Jetpack Boost**

4.8.1

Works

Concatenated CSS and JavaScript and deferred non-essential JavaScript.

**Speed Optimizer (SiteGround)**

7.8.5

Works

File cache, minify, combine CSS and JavaScript, defer and lazy-load. Combine JavaScript used to fold Modal Kit’s script into a classic bundle, so no modal opened. Modal Kit now tells it to leave its scripts alone, with nothing to set.

**A2 Optimized WP**

3.0.13

Works

Page cache, with HTML and inline CSS and JavaScript minified. That minify breaks WordPress’s own speculative loading rules on every page, a console error that doesn’t affect modals. On A2 Hosting’s servers, LiteSpeed Cache does the rest.

**Cache Enabler**

1.8.17

Works

Page cache, with HTML and inline CSS and JavaScript minified. Every page came from the cache.

Tested on 13 November 2026 with WordPress 7.1.4, PHP 8.3, Apache 2.4 and Twenty Twenty-Five, one plugin at a time. WP Rocket was built from its GitHub source. CDNs were tested with a stand-in that sends no CORS headers, as many don’t.

Settings

## Tuning a speed plugin for modals

Modals work with these plugins on their default and most aggressive settings. These are for when you want something to behave differently.

**Modals that open on their own, with delay JavaScript**

Delay JavaScript holds scripts back until the visitor moves, scrolls, types or taps. Links and buttons still open modals straight away, but a modal set to open on load or after a few seconds waits for that first move. To open it on time, exclude Modal Kit from delay. The path covers Pro too.

**WP Rocket:** under File Optimization, add /content/modules/modal-kit to Delay JavaScript execution’s excluded files. Tested.

**WP-Optimize:** add /content/modules/modal-kit to its Delay JavaScript exclusions. Tested.

**Remove unused CSS and critical CSS**

These services build CSS from what shows when the page loads, and a closed modal doesn’t show. Keep Modal Kit’s stylesheets whole.

**WP Rocket:** add /content/modules/modal-kit/(.*).css and /content/modules/modal-kit-pro/(.*).css to the Remove Unused CSS safelist.

**LiteSpeed Cache and Jetpack Boost:** nothing to set: Modal Kit keeps its stylesheets whole and loads them with the page.

**Breeze: lazy-load and delay all JavaScript**

With both on, Breeze’s lazy-loader never starts and lazy images stay blank across the page, in modals or not. Use one or the other.

**Pages cached for days**

Pro’s server-drawn games and WooCommerce add-to-cart use short-lived tokens. When a cached page is older than its token, Pro gets a fresh one and carries on, so long cache lifetimes are fine.

**Country rules (Pro)**

A modal that targets countries prints a decision for each visitor, so the cache must vary by country or skip those pages. The modal’s Country panel says so when it applies.

Static exports

## The strictest cache of all

A static export is a cache that never asks WordPress anything again. Modal Kit’s test suite exports a site with Simply Static and tests it with no WordPress behind it.

01

**Exported, then tested**

The exported files are served on their own, then links, lazily loaded triggers, page targeting, fonts, frequency and the no-JavaScript fallback are checked.

02

**Links work without JavaScript**

A #modal-name link shows the modal with CSS alone, so it still opens if scripts are blocked or haven’t loaded yet.

03

**Pro on a static site**

Games with fixed codes, the age gate and teasers work on an export. Kit, Mailchimp, MailerLite and Brevo forms post straight to the service when the site isn’t there to relay them.

In the docs

[Page caches and speed plugins →](https://modalkitwp.com/docs/caching/)

[Static exports →](https://modalkitwp.com/docs/static-exports/)

## Keep your speed score. Add the modal.

[Download free](https://packages.cocartheadless.com/download/latest/modal-kit.zip)

[Try the playground](https://modalkitwp.com/#playground)
