case study · WooCommerce optimisation

A faster store after a rebuild without a rebuild

vesca.pl sells sauna textiles, mostly through Meta campaigns and almost entirely to phone users. Checkout was sluggish and PageSpeed rated the store 64/100. Within a few days checkout got faster and PageSpeed went up, with no changes to the theme, plugins or database.

Platform
WordPress · WooCommerce · Elementor
Scope
Audit, checkout, PageSpeed, cookie consent, hosting
Rollout
2 stages, November 2026
Footprint
mu-plugin files only, each one reversible
Summary graphic (in Polish): mobile PageSpeed from 64 to 90, LCP down 66%, product page 59% lighter, 0 ms main-thread blocking
PageSpeed Insights, mobile, home page: 64 before and 90 after the production rollout.

01 / challenge

Customers waited at checkout and Google scored the store 64/100

Traffic arrives in waves from ads, almost all of it on phones. The owner reported a slow cart and checkout, and a page that could freeze after a minute of typing in details. PageSpeed Insights showed an orange score, as low as 53 in one run.

Constraint

No experiments on production

No changes to the theme, plugins or database. The store sells every day, so every fix had to be reversible within seconds.

Constraint

Tracking and payments stay

GA4, Meta, Klaviyo and Triple Whale drive the campaigns, and Apple Pay and Google Pay are what customers expect. They could be delayed, not removed.

Goal

A faster path to purchase

Cart and checkout that never wait on third-party services and never freeze while the customer types.

Goal

Green PageSpeed and a hosting answer

A 90+ mobile score and a clear, measured answer to how much a better server would help.

02 / method

A copy of the store and numbers first, changes second

  1. step 1Store copyThe whole store restored from backup in Docker, with outbound traffic blocked, no payment keys and no customer emails.
  2. step 2Purchase scriptProduct → cart → review → three recalculations, 10 runs each as a mobile customer.
  3. step 3DiagnosisPHP profiling (Xdebug), Lighthouse reports and Chrome code coverage.
  4. step 4Fixes and A/BEach change measured on its own with the same script, before and after.
  5. step 5ProductionTwo-stage rollout with an external measurement after each stage.

03 / stage 1 · cart and checkout

The culprit: a payment gateway calling its API on every click

On every checkout recalculation, such as a change of shipping method or postcode, the PayU plugin fetched the list of payment methods from PayU's servers. It cached the list for only 60 seconds, and not at all after an error. On slow shared hosting that meant over a second of waiting per step and a checkout that seemed to hang.

What changed

  • The payment method list is cached for an hour and refreshed in the background. Customers never wait for PayU, and checkout sends zero requests to the gateway.
  • Cart AJAX requests and the cart and review pages skip plugins they do not need (15 on AJAX, 6 on the pages).
  • BLIK, standard payment, Apple Pay and Google Pay work as before.

How it was verified

  • External measurement on production as a new iPhone customer, median of 10 runs, no orders placed.
  • A separate test: a recalculation after 70 seconds of typing takes as long as one without the pause, so the freezes are gone.
  • Diagnostic response headers confirm the fixes are active on production.
beforeafter the fixes, productionserver response time, median of 10 runs
Order recalculation1.40
0.77 s
Cart page1.90
1.21 s
Order review (checkout)1.90
1.23 s
Mini-cart refresh1.58
0.68 s

Scale: full width = 2 s. On a copy of the store on a faster server the same steps took 0.09–0.26 s.

−41%
whole cart → checkout path 8.0 s → 4.75 s
−45%
order recalculation 1.40 s → 0.77 s
−57%
mini-cart refresh 1.58 s → 0.68 s
0
PayU requests at checkout previously one on every step

04 / stage 2 · PageSpeed

From 64 to 90 on mobile

Lighthouse reports and code coverage pointed to three causes. Tracking scripts loaded up front accounted for half the page weight and nearly all main-thread blocking. On top of that came a dozen stylesheets the page did not use, and the Google Pay and Apple Pay SDKs on every page.

PageSpeed Insights before: performance 64, LCP 10.3 s, TBT 260 ms, Speed Index 5.9 s
Before13 Nov, 08:00. Score 64, main content after 10.3 s.
PageSpeed Insights after: performance 90, LCP 3.5 s, TBT 0 ms, Speed Index 3.1 s
After13 Nov, 11:09. Score 90, main content after 3.5 s, no blocking.
+26
performance points 64 → 90, home page
−66%
LCP, main content 10.3 s → 3.5 s
0ms
total blocking time previously 260 ms
−47%
Speed Index 5.9 s → 3.1 s

Trackers after the first interaction

  • GTM, gtag, Klaviyo and Triple Whale start on the user's first interaction or after 4 s.
  • Events are queued and never lost. Cart, checkout and the thank-you page behave as before, so conversions are counted as they were.

CSS and payments only where needed

  • Stylesheets from Header Footer Elementor, Instagram, Swatches, PayU and others no longer load on browsing pages.
  • Google Pay and Apple Pay load only at checkout: −820 KB on the product page. A third-party cookie went away too, lifting Best Practices from 73–77 to 96–100.

05 / three templates

Product page: from 63 to 96, product visible after 1.7 s

A single PageSpeed run can swing by a few points, so the results for the three page types are medians of three Lighthouse runs with PageSpeed Insights settings (mobile, slow 4G).

PageScoreLCPWeightRequestsWeight Δ
Home page73 → 885.3 → 3.5 s1,538 → 695 KB152 → 84−55%
Product page63 → 965.3 → 1.7 s2,250 → 933 KB192 → 112−59%
Category63 → 915.9 → 3.5 s2,022 → 550 KB146 → 69−73%
Lighthouse, product page before: score 63, FCP 3.3 s, LCP 5.1 s, TBT 330 ms
BeforeProduct page: 63 points, with only a loading spinner for several seconds.
Lighthouse, product page after: score 96
AfterProduct page: 96 points, main content after 1.7 s.

06 / rejected experiment

Not every cleared warning is a win

PageSpeed still flagged render-blocking resources (jQuery). So I tested deferring every script: zero JS errors and zero pixels of visual difference, and the warning disappeared. But the main content appeared later and the score did not improve. The change never reached production, because the measurement decides, not the list of warnings.

07 / hosting

How much would a better server help? Measured, not promised

A copy of the store with the same fixes went onto a VPS limited to 1.5 CPU and was measured right after production. The client received a comparison of WordPress hosting and VPS offers with the three-year cost at renewal prices, not just the introductory price.

Two PageSpeed reports side by side: production on shared hosting 87, copy on a VPS 96
Same page, two servers. Left: production on shared hosting (87). Right: the copy on a VPS (96). PageSpeed Insights, 13 Nov, 14:42 and 14:45. The lower SEO score on the copy comes from the test environment's indexing block.

PageSpeed 87 → 96

Cached pages gain mostly stability. On production the score hovers around 88; on the VPS it stays above 90.

Cart and checkout 7–8× faster

Cart and checkout pages cannot be cached, so the server renders each one. This is where better hosting pays off most, exactly where the customer pays.

08 / bonus

Along the way I checked which scripts start before the visitor answers the consent banner (GDPR, Google Consent Mode v2). I prepared a fix in which script delaying works together with Complianz: marketing scripts wait for consent and load without errors once it is given. The whole flow was tested automatically on the store copy, before and after consent.

technologies and tools

  • WordPress
  • WooCommerce
  • Elementor / Astra
  • PHP 8.4
  • mu-plugins
  • Redis
  • MariaDB
  • Docker
  • Xdebug
  • Lighthouse 13
  • PageSpeed Insights
  • Puppeteer
  • Chrome DevTools Protocol
  • LiteSpeed Cache
  • Complianz
  • PayU

Method: PageSpeed means Lighthouse with PSI settings (mobile emulation, slow 4G), medians of 3 runs; PSI screenshots are single runs, and the score varies by a few points between them. Checkout timings are server response times from the purchase replay script, 10 runs, no orders placed. The "before" checkout figures come from the initial audit and the client's own measurements, taken with a similar but not identical method.

next step

Facing a similar challenge?

Tell me what you want to achieve. I'll come back with a concrete proposal, a quote and a delivery plan.