SnIPPETsX › WooCommerce Speed Checklist (WPForge-oriented)
WooCommerce Speed Checklist (WPForge-oriented)
JavaScript · updated Oct 29, 2026 · 42 lines
main.js
WooCommerce Speed Checklist (WPForge-oriented)
A field checklist for WordPress / WooCommerce storefronts that feel slow on catalog, product, and cart pages. Measure first, change one thing, then measure again.
1. Baseline
- Capture TTFB, LCP, and INP on home, one product page, and the cart.
- Test cold and warm cache with a catalog that looks like production (images, variations, a few plugins).
- Keep the same device profile so numbers stay comparable.
2. PHP and hosting
- Run a current PHP 8.x with OPcache enabled.
- Prefer Redis (or an equivalent) as the object cache so sessions and transients are not all hitting MySQL.
- Do not fire wp-cron on every front-end hit during a sale; a system cron is steadier.
3. Theme and assets
- Keep a single layout system. Two builders on one store usually means two copies of CSS and JS.
- Dequeue WooCommerce assets on pages that are not shop, product, cart, or checkout.
- Prefer a system font stack, or one subset webfont. Icon fonts loaded sitewide for a few glyphs add needless requests.
4. Images
- Give the hero and the first product photo explicit width and height; do not lazy-load the LCP image.
- Generate only the thumbnail sizes the theme actually prints.
- Serve a modern format when the host or CDN can do it without a second rewrite plugin.
5. Plugins and cart
- List every script that prints on all pages (reviews, chat, currency, analytics) and drop what the template does not need.
- The mini-cart fragment request (wc-ajax=get_refreshed_fragments) bypasses page cache. If the header cart does not have to be live, that call is optional cost.
- Load payment and shipping SDKs on checkout only.
6. Cache
- Full-page cache anonymous catalog HTML.
- Exclude cart, checkout, my-account, and any URL that embeds a nonce or a personalized price.
- Do not let a geo banner or a logged-in admin bar get stored in the public cache.
7. Data
- Purge expired transients and old sessions on a schedule.
- If layered nav is slow, confirm product attribute lookups are indexed before adding another filter plugin.
After each change, recheck the same three URLs. Keep the change only if add-to-cart, variation selection, and checkout still work.
Notes for this stack live at https://shopaiwp.com
Run this JavaScript snippet
Open this snippet on SnIPPETsX to run the JavaScript code in your browser, edit it together with others in real time, or fork it into your own copy. No install or account is needed.