Core Web VitalsGoogle's page quality metrics: speed, layout stability, responsiveness. More in the glossary → are three Google metrics that show how a live shopper experiences a page. LCP shows how quickly the main content appears. INP shows how quickly the site responds to clicks. CLS shows whether the layout "jumps" while the page loads. To turn the Core Web Vitals of an online store green, installing a caching module is not enough. You need to find what slows each metric: the server, heavy images, fonts, or third-party scripts. Below we walk through this using OpenCart 3.0 and 4.1 as examples. The examples are for OpenCart 4.1; in 4.0.x, model triggers and event handling work differently.
What are LCP, INP, and CLS, and which values count as good?
Each of the three metrics describes a separate pain point for the shopper. LCP (Largest Contentful Paint) is the time it takes to render the largest visible element in the first screen. On a product card this is usually the main photo, and on the home page it is a banner or slider. INP (Interaction to Next Paint) is the delay between a user action and the screen's response to it. The action might be a click on "Buy," opening a filter, or selecting an option. INP replaced the older FID metric and measures all interactions during a visit, not only the first one. CLS (Cumulative Layout Shift) is the total shift of elements. Because of it, a shopper aims for a button and instead taps an advertising banner that suddenly appeared above it.
| Metric | Good | Needs improvement | Poor |
|---|---|---|---|
| LCP | up to 2.5 s | 2.5–4 s | over 4 s |
| INP | up to 200 ms | 200–500 ms | over 500 ms |
| CLS | up to 0.1 | 0.1–0.25 | over 0.25 |
Google calculates these metrics at the 75th percentile of real visits. A page is "green" if at least three quarters of views fall within the good threshold. This is critical for a store, because most Ukrainian traffic is mobile: an old Android phone on 4G gives very different numbers than your laptop in the office. Core Web Vitals are only one ranking signal, and content and relevance matter more. Still, a slow product card directly hurts conversions regardless of SEO. The overall picture of search optimization is described in the article where to start SEO for an OpenCart store.
How do you measure the Core Web Vitals of a store correctly?
The most common owner mistake is running PageSpeed Insights, seeing a score of 45, and panicking. The score at the top is a lab test: a single load on an emulated slow phone. It is useful for diagnostics, but Google evaluates a site by field data, meaning the Chrome UX Report based on real Chrome users. The block "Discover what your real users are experiencing" at the top of PageSpeed Insights is what truly matters.
- Google Search ConsoleA free Google service for monitoring impressions, clicks, and errors. More in the glossary → → "Core Web Vitals" groups URLs by type: product cards, categories, and the home page. This shows whether a problem exists across all categories rather than on a single page.
- PageSpeed Insights shows field data for a URL or the whole domain, plus lab diagnostics with advice: which element is the LCP and which scripts block rendering.
- Chrome DevTools → Performance lets you record a click on "Buy" and see which JavaScript function occupies the main thread.
- The web-vitals library lets you send metrics to GA4 and view them by page and device. Analytics setup is described in the material what to set up in store analytics on the first day.
To quickly find out which element the browser considers the LCP, open the page and then paste the following into the DevTools console:
new PerformanceObserver((list) => {
const entries = list.getEntries();
const last = entries[entries.length - 1];
console.log('LCP:', Math.round(last.startTime), 'мс', last.element);
}).observe({ type: 'largest-contentful-paint', buffered: true });
Why is LCP slow and how do you speed it up in OpenCart?
LCP consists of several stages. First, the server delivers the HTML (TTFB). Then the browser finds the main image, downloads it, and renders it. A delay at any stage adds to the total.
Server and page generation
If OpenCart takes 1.5–2 seconds to generate a category, you will not get a green LCP no matter how much you compress photos. Typical causes: weak shared hosting, an old PHP versionThe language version on the hosting. 3.0.4.1 requires at least PHP 7.3, while 3.0.5.1 and 4.1.0.4 require at least PHP 8.1; check extension compatibility before updating. More in the glossary → without OPcache, the product count enabled in categories on a large catalog, and slow SQL queries from filter modules. A full breakdown of all options is in the article 12 reasons why OpenCart runs slowly. To find heavy queries, see how to find slow queries and the indexes you need. The biggest effect for anonymous visitors comes from a full-page cache. What this looks like in practice is described in the Jet Cache module review.
Main image
The second classic problem is a product photo uploaded from a camera at 4000 px and 3 MB. OpenCart creates thumbnails via model tool/image using the sizes from the settings. How this works is described in the article how OpenCart creates thumbnails. If the sizes are set too large, a mobile device downloads an image three times bigger than needed. In OpenCart 4.1, sizes are set in System → Settings, on the Image tab.

In OpenCart 3.0, the image sizes for products and categories are located in the theme settings: ExtensionsAdditional functionality: a module, a payment or shipping method, a feed, or a theme. They are managed in "Extensions → Extensions." More in the glossary → → Extensions, type "Themes," edit the active theme.

Two more things matter. First, the LCP image should never be lazy-loaded: loading="lazy" on the first photo of a card or the first slide guarantees a worse metric. Second, it should be given priority. A fragment of a product card template might look like this:
{% if thumb %}
<img src="{{ thumb }}" alt="{{ heading_title }}"
width="{{ image_width }}" height="{{ image_height }}"
fetchpriority="high" decoding="async" class="img-fluid">
{% endif %}
The variables image_width and image_height need to be passed from the controller, for example through an event or a modification in your theme. More about WebP and lazy load is in a separate article in the images section.
Render-blocking resources
CSS and synchronous scripts in <head> delay rendering, even when the photo has already loaded. The template pulls in Bootstrap, Font Awesome, jQuery, several module CSS files, and Google Fonts, and the browser waits for all of them. How to inline critical CSS and defer the rest is described in the article template optimization: fonts, scripts, and critical CSS.
Why does the page "jump," and how do you fix CLS?
CLS in stores almost always has a few recurring causes. They are easy to find: in DevTools, enable Rendering → Layout Shift Regions, and shifts will be highlighted in blue.
- Images without dimensions. If
<img>has nowidthandheight, or the CSS propertyaspect-ratio, the browser does not know the block's height. After the photo loads, the text below it shifts. Check the product grid, slider, and card templates, because in standard and many commercial themes the size attributes are often missing. - Home page slider. While the JS carousel initializes, all slides are stacked in a column or the container has zero height. Give the container a fixed aspect ratio in CSS right away.
- Web fonts. When a system font is swapped for a loaded one, line widths and block heights change.
font-display: swaptogether with a matched fallback font helps, as does hosting fonts locally instead of using Google Fonts. - Blocks inserted at the top. A cookie banner, a "Free shipping from…" strip, a chat widget, or an "Item added to cart" message pushes content down. Reserve space for them or show them over the content as a fixed element.
- AJAX modules. "Recommended," "Recently viewed," and reviews that load after the page has loaded should reserve their space in advance, at least as a skeleton placeholder.
CLS is counted throughout the whole visit, not only during loading. So an expanding cart and a filter that rebuilds the list without reserving height also add to the score.
Why does the "Buy" button respond with a delay: how do you improve INP?
INP gets worse when the browser's main thread is busy with JavaScript and cannot process the click in time. In an online store, the main load is usually not created by OpenCart scripts but by everything added on top: Google Tag ManagerA container for managing scripts without editing code. More in the glossary → with a dozen tags, Meta and TikTok pixels, online chat, review widgets, call tracking, and popup services. Each of them runs its code precisely when the shopper tries to open a filter.
What really helps:
- Audit third-party scripts. Open the Coverage tab or the "Reduce the impact of third-party code" report in PageSpeed. Remove scripts that nobody uses, such as an old pixel or a second chat, without hesitation.
- Deferred loading of widgets. Chat and social media widgets can be loaded after the first interaction or a few seconds after the page loads.
- Instant visual feedback. In OpenCart, adding to the cart is an AJAX request. INP measures the time to the next frame, not the time to the server's response. If the button immediately switches to an "Adding…" state, the metric stays in the normal range even with a slow server. But if a heavy handler runs before the request, such as event tracking for analytics, the shopper sees a "dead" button.
- Lightweight filters. A filter module that re-renders hundreds of products and re-initializes all sliders on every click is a typical cause of poor INP on categories. The article product filters in OpenCart: options and mistakes covers choosing a filter.
- DOM size. A menu with a thousand items hidden on every page, and a category with 100 products on one page, slow down any interaction. Sensible pagination of 24–48 products often helps more than minification.
In what order should you fix things so you don't waste the budget?
The sequence matters, because each step builds on the previous one. There is no point polishing critical CSS if the server takes two seconds to deliver the HTML.
- Record the starting point. Save the Search Console report and PageSpeed results for five templates: home page, category, product card, search, and cart.
- Server. Current PHP version, OPcache, adequate hosting, and page caching. The goal is a TTFB for cached pages within a few hundred milliseconds.
- Images. Correct thumbnail sizes, WebP, priority for the LCP photo, lazy load for everything below the first screen, and explicit dimensions for all
<img>. - Layout stability. Sliders, fonts, banners, and AJAX blocks with reserved space.
- JavaScript. Remove unnecessary third-party scripts, defer widgets, and check click handlers on the cart and filter buttons.
- Re-measure. Lab right away, field after 3–4 weeks.
A note on the template. If a theme is overloaded with effects, sometimes it is cheaper to switch to a lighter one than to patch the old one. When choosing a new theme, run its demo through PageSpeed on mobile and look specifically at the product card. On this page the shopper decides whether to buy, so it deserves the most attention. What else should be on the card is described in the article a product card that sells.
If you don't want to assemble caching, minification, and deferred loading from different modules, a comprehensive solution covers these tasks: the "Jet Cache — caching, PageSpeed, optimization, SEO" module. It combines in one extension a page cache for anonymous visitors and optimization of the page's resources. In other words, it covers part of the "Server" step (page caching) and the work with scripts and styles from the "JavaScript" step. This is especially convenient when a store already has several separate optimizers that conflict with each other. But even after any module, verify the result using the scheme above: automation does not know which image is your LCP or which chat can be removed. The other topics in this section are collected on the page Speed, hosting, and caching.
Summary
- Core Web Vitals are LCP (up to 2.5 s), INP (up to 200 ms), and CLS (up to 0.1) at the 75th percentile of real visits. Focus on field data from Search Console, not on the PageSpeed score.
- LCP in an OpenCart store is most often hurt by slow page generation and oversized main photos. Caching, the server, and correct thumbnail sizes give the greatest effect.
- CLS comes from images without dimensions, sliders, fonts, and blocks inserted at the top. Reserve space for everything that loads later.
- INP is worsened by third-party scripts and heavy click handlers. Auditing pixels and widgets often gives more than any code optimization.
- Next step: record the metrics for the five key templates, find the weakest one, and fix in the order server → images → layout → JavaScript.