How to Fix Core Web Vitals assessment failed in WordPress

Dibbyyan Nath
25 Min Read

If you’ve come across a “Core Web Vitals Assessment Failed” notification on your WordPress site, don’t worry too much. It might seem like a setback, but trust me, it’s not something you can’t overcome. This issue usually arises when your site’s performance isn’t up to par in one or more of the three key metrics: Largest Contentful Paint (LCP), First Input Delay (FID), and Cumulative Layout Shift (CLS).

But guess what? I’ve got your back! I’m going to guide you through some proven methods to fix this problem and boost your website’s performance. I’ll cover strategies like using optimization plugins to fine-tune your site, selecting a high-speed hosting provider to ensure snappy load times, minimizing the execution of JavaScript to keep things running smoothly, and taking advantage of image CDN services to speed up image delivery.

So, join me on this journey from failure to success in mastering Core Web Vitals. I’ll help you optimize your WordPress site and make it perform like a champion. You’ll see that with a little effort and the right techniques, you can conquer those Core Web Vitals and provide an exceptional user experience for your visitors. Let’s get started!

First Content full paint marks less 3 micro seconds with WProcket

How Can I Pass Core Web Vitals in WordPress (LCP CLS, TBT) While Fixing 25+ PSI Items?

To improve the Core Web Vitals (LCP, CLS, TBT) in WordPress and address the 25+ PageSpeed Insights (PSI) issues, you should consider the following steps:

  1. Optimize Largest Contentful Paint (LCP): This measure indicates the time it takes for the main content on your page to load. To optimize this:
    • Compress and preload images. Use plugins like Smush for image compression.
    • Serve images from a Content Delivery Network (CDN).
    • Reduce server response time (TTFB). Hosting options such as Rocket.net can help improve site speed and TTFB.
  2. Minimize Cumulative Layout Shift (CLS): CLS measures visual stability. To minimize this:
    • Avoid layout shifts by specifying dimensions and using explicit width and height attributes for any media (video, images, GIFs, infographics etc.).
    • Implement lazy loading for images and other media.
  3. Improve Total Blocking Time (TBT): This is the time between FCP and TTI. To improve TBT:
    • Defer and minify JavaScript.
    • Avoid heavy page builders and use lightweight themes like GeneratePress, Kadence, Blocksy, or Oxygen.
    • Utilize plugins like LiteSpeed Cache, FlyingPress, Perfmatters, and WP Rocket to host third-party code locally.
  4. Optimize Other PSI Issues:
    • Leverage caching strategies and use cache plugins like FlyingPress, SG Optimizer, LiteSpeed Cache, WP Rocket, and NitroPack.
    • Utilize Content Delivery Networks (CDNs) like Cloudflare, BunnyCDN, and QUIC. cloud, Google Cloud CDN, KeyCDN, and StackPath.
    • Avoid plugins that add CSS/JS to the front end, increase CPU usage, add database bloat, or load above the fold.
    • Use optimization techniques such as removing unused CSS, removing Gutenberg CSS, and using asset unloading plugins.

How can I improve core web vitals on my WordPress site?

Reducing the impact of third-party code on your website’s performance involves identifying the issues that may be causing slowdowns and applying effective strategies to manage these issues. Here’s how you can do this:

  1. Identify Slow Scripts: Use tools such as Chrome DevTools, Lighthouse audits, PageSpeed Insights, and WebPageTest to identify third-party scripts that are blocking the main thread or otherwise slowing down your page load time.
  2. Remove Unnecessary Scripts: Eliminate any third-party scripts that aren’t necessary for your website’s functionality. The fewer scripts your site needs to load, the faster it will be.
  3. Optimize Script Loading: Techniques such as using async and defer attributes, implementing lazy loading, and optimizing resource loading can help manage how your third-party scripts are loaded. The async and defer attributes allow scripts to load in the background without blocking rendering, while lazy loading only loads scripts when they’re needed.
  4. Self-hosting Resources: Self-hosting third-party JavaScript allows you to have better control over caching and version management, which can lead to performance improvements.
  5. Establishing Early Connections: Preconnect and dns-prefetch are techniques that can establish connections to third-party sites early, which can reduce the time it takes to fetch resources.
  6. Avoid document.write() Scripts: These types of scripts can block the rendering of a page, so they should be avoided.
  7. Using Third-Party Script Management Tools: Tools like the Next.js Script component and Zaraz.com can be used to manage third-party scripts, allowing developers to sequence and optimize script loading based on different strategies.

Reduce the impact of third-party code

Reducing the impact of third-party code can significantly improve your Core Web Vitals, which are critical metrics for evaluating the quality of a user’s experience on your website. Here are some strategies for reducing the impact of third-party code on your site:

  1. Audit and Remove Unused Scripts: A first step can be auditing and removing any unused third-party scripts that are running on your site. These can often slow down the performance without adding any value to your site.
  2. Selective Loading and Code Splitting: Loading only the necessary scripts for each page and splitting large scripts into smaller, manageable ones can improve script loading efficiency.
  3. Delaying Script Loading: Delaying the loading of third-party scripts until the main content has loaded can enhance the user experience and improve your Core Web Vitals. This can be done by using the defer or async attributes in your script tags.
  4. Implement Resource Hints: Resource Hints like DNS-prefetch and preconnect can be used to inform the browser of third-party resources and initiate early connections, reducing the latency when these resources are required.
  5. Lazy Loading: Lazy loading can be applied to defer the loading of resources until they are needed. This technique fetches content as it enters the viewport, optimizing the initial page load.
  6. Self-hosting Third-Party JavaScript: Self-hosting third-party JavaScript gives you control over cache settings, which can improve performance. However, this requires careful planning and regular updates to keep the scripts current.
  7. Performance Budget: Implementing a performance budget can be helpful to track the number of requests, script sizes, and other performance metrics. This can help you keep a check on the impact of third-party scripts on your site’s performance.

First input delay (FID)

First Content full paint result

First Input Delay (FID) is one of the three core web vitals, as specified by Google, along with Largest Contentful Paint (LCP) and Cumulative Layout Shift (CLS). FID measures the time it takes for a browser to process user input on a webpage and is crucial for enhancing the user experience and interactivity of a site.

A good FID score is less than 100ms, as it ensures the page is responsive to user inputs in a timely manner. There are several strategies you can use to improve your FID score:

  1. Reduce JavaScript Execution: One of the main causes of a high FID is extensive JavaScript execution. By reducing JavaScript and third-party scripts, you can make the page more responsive to user inputs. You can use the “async” and “defer” attributes for JavaScript loading, reduce unused JavaScript, and use code splitting.
  2. Breaking Up Long Tasks: Long tasks are defined as any piece of code that blocks the main thread for 50 milliseconds or more. By breaking up these tasks, the main thread can remain free and respond to user input.
  3. Remove Unused Polyfills: Unnecessary polypills can clog up your code and lead to longer FID times. By removing any that aren’t needed, you can streamline your code and improve responsiveness.
  4. Optimize Server Response Time: The longer it takes for your server to respond, the longer it takes for a user to interact with your site. Google recommends a server response time under 600 milliseconds. Improve server response time with better hosting, CDN usage, and plugin review.
  5. Caching Assets: This helps load content more quickly, thereby improving overall performance.
  6. Controlling Content Visibility: By strategically making certain elements on a page visible or invisible based on user interaction, you can free up resources for more important tasks.
  7. Review Third-Party Scripts: Third-party scripts can significantly affect your site’s performance. Evaluate whether these scripts are necessary and how they impact your FID.

Avoid large layout shifts

To avoid large layout shifts and improve web core vitals, especially Cumulative Layout Shift (CLS), there are several techniques that can be implemented:

  1. Specify image dimensions: Unspecified image sizes can lead to page shifting as the browser determines dimensions during loading. Always define the width and height attributes on image elements to prevent this from happening.
  2. Use aspect ratios on images: The aspect ratio helps keep the image shape while it’s loading, preventing the browser from having to shift the layout once the image fully loads.
  3. Reserve space for ads and embeds: Dynamic advertisements and embeds can cause content to push and pull, disrupting the layout. Therefore, it’s essential to preallocate the space for these elements to prevent shifts.
  4. Use min-height to reserve space: If loading external content, reserving some space using a minimum height can prevent layout shifts. This technique can be particularly useful if the full content can’t be returned within 500ms, as any non-zero height will be an improvement.
  5. Preload web fonts: Web fonts, downloaded and applied while rendering can cause font size and line-height variations, leading to layout shifts. Preloading web fonts can help mitigate this problem.
  6. Optimize JavaScript elements: Paying attention to how JavaScript impacts your page layout and optimizing accordingly can reduce CLS. You should also handle user interactions within 500ms to prevent unexpected layout shifts.
  7. Avoid content hiding on page load: Any content that shows and then hides can cause layout shifts. Avoid this practice to reduce CLS.
  8. Be mindful of CSS/JS animations: Animations that cause elements to change position can lead to layout shifts. Be careful when implementing animations, and ensure they don’t disrupt the stability of the layout.
  9. Use Lighthouse and Web Vitals JS Library: These tools can help identify CLS issues, providing performance scores, recommendations, and a visual timeline of page loading.
  10. Place UI elements below the fold: This will help to reduce any layout shift caused by these elements loading.

Tidy above the fold

To improve the Core Web Vitals of your website, specifically focusing on the “above-the-fold” area (the part of the webpage visible to the user without scrolling), you can follow several strategies. These strategies aim at optimizing the three Core Web Vitals metrics, namely. Here are some recommendations:

1. Optimize Images: Image optimization is a crucial aspect of improving Core Web Vitals. You should focus on reducing image dimensions, removing unnecessary above-the-fold images, and using efficient image formats like WebP. Additionally, implement lazy loading for images that are not critical for above-the-fold content, meaning they only load when the user scrolls to them. Large images and background videos can delay LCP and increase CLS, so consider using a single, optimized image above the fold and move background videos lower on the page.

2. Minimize JavaScript Execution: JavaScript can block rendering and increase your page’s loading time, affecting both LCP and FID. Try to minimize, defer, or async non-critical JavaScript files. Remove unnecessary scripts from your site to further enhance the loading speed.

3. Use Caching: Using caching strategies can help reduce load times and improve LCP. Server-side caching or even client-side caching can help deliver content faster to your users.

4. Limit and Optimize Fonts: Web fonts can impact the performance of your website, increasing the time it takes for meaningful content to appear on the screen (LCP). Limit the number of fonts and weights used on your site, and ensure that you’re preloading critical fonts.

Serve images in next-gen formats

Serving images in next-generation formats like WebP and AVIF can significantly improve the Core Web Vitals, a set of three metrics introduced by Google (Largest Contentful Paint, First Input Delay, and Cumulative Layout Shift) used to measure and enhance user experience on the web.

Image Compress Webp to JPG

To achieve this, here are some steps and recommendations you can follow:

  1. Convert Images to Next-Gen Formats: Tools like Photoshop plugins or online converters can be used to convert images to next-gen formats like WebP, AVIF, JPEG 2000, and JPEG XR, which offer superior compression and quality compared to older formats. WordPress users can also use plugins like Optimole and Enhanced Media Library for this purpose.
  2. Optimize Image Loading: Next-gen formats provide smaller file sizes which enhance website performance by reducing bandwidth costs and improving page load times. You can further enhance this by compressing and resizing images before uploading them. WordPress users can also use plugins like Smush Pro for bulk compression and automatic optimization.
  3. Browser Compatibility: Use the <picture> element or feature detection tools like Modernizr to serve WebP images to browsers that support it and fall back to JPEG or PNG for others. This ensures compatibility across different browsers. If some platforms don’t fully support these next-gen formats, serve optimized fallback images in JPEG/PNG.

Avoid an excessive DOM size

It’s really important to keep an eye on the Document Object Model (DOM) size if you want to improve your Core Web Vitals. The DOM size refers to the number of HTML tags, how they’re nested, and the relationships between parent and child nodes. When a page has more than 1,500 DOM nodes, a nesting level exceeding 32 nodes, or a parent node with over 60 child nodes, it’s considered to have an excessive DOM size. And let me tell you, that can have a negative impact on your page load speed and overall rendering performance.

Avoif DOM Sizes

Excessive DOM size can be caused by a variety of factors. It could be poorly coded plugins, JavaScript-generated nodes, bloated HTML from page builders, copied and pasted text in WYSIWYG editors, or inefficient template coding. These issues can contribute to an unnecessarily large DOM size, which in turn affects the performance of your website.

The good news is that you can address these issues and significantly improve your Core Web Vitals. By optimizing your code, removing unnecessary elements, and ensuring efficient coding practices, you can reduce the DOM size and improve the overall performance of your site. So, keep an eye on that DOM size and make sure it stays in check for a faster and smoother user experience.

Here are some strategies to avoid excessive DOM size:

  1. Optimize Plugins and Themes: Replace or remove poorly coded plugins and themes that contribute to bloated DOM sizes.
  2. Minimize JavaScript-Based DOM Nodes: Avoid unnecessary JavaScript files that generate extra DOM nodes.
  3. Optimize Page Builders: Some page builders generate bloated HTML, contributing to a large DOM size. Optimize the use of page builders to reduce the DOM size.
  4. Clean Up Copied Text: Avoid copying and pasting text into WYSIWYG editors as this often introduces unwanted formatting and extra HTML tags.
  5. Split Large Pages: If you have a one-page design with a large DOM size, consider splitting it into multiple pages.
  6. Implement Lazy Loading and Infinite Scroll: These techniques can help mitigate the impact of large DOM size by loading content only when needed or as the user scrolls down the page.
  7. Avoid Complex CSS Declarations and Memory-Intensive JavaScript: They can increase the time it takes to render a page.
  8. Use Performance-Optimized Themes: These themes are typically designed with a focus on reducing excessive DOM nodes.
  9. Use Content Visibility Property: This feature can help improve rendering performance by skipping the rendering of offscreen content.

Easily Fix Core Web Vitals assessment failed in WordPress using WProcket

WP Rocket speed optimization settings to achive above 95 percent
  1. Avoid Large Layout Shifts (Cumulative Layout Shift): It is a crucial metric that measures the visual stability of a webpage by tracking unexpected layout shifts. Poor CLS scores can result from images and videos without dimensions, ads and iframes without fixed sizes, and web fonts causing a flash of unstyled or invisible text. To fix this, specify dimensions for your images and videos, manage ad and embed sizes, preload web fonts, and use the CSS transform property for animations. In WP Rocket, you can automatically optimize CLS by enabling options for media optimization, which includes setting image dimensions and enabling the LazyLoad for images, iframes, and videos.
  2. Remove Unused JavaScript: Unused JavaScript files can negatively impact the performance of your website. They are not necessary for rendering the page and can affect important metrics like First Input Delay (FID) and Total Blocking Time (TBT). WP Rocket helps manage unused JavaScript by providing features to delay JavaScript execution, thereby ensuring that files are loaded only upon user interaction and improving site speed.
  3. Reduce Server Response Times: While there is no specific information about reducing server response times in the sources, generally, WP Rocket helps to reduce server response times by implementing several caching strategies, such as the browser and page caching. Furthermore, WP Rocket’s CDN support can further decrease server response time by serving your site’s static files from the network of servers spread around the globe.
  4. Eliminate Render-blocking Resources: Render-blocking resources pause the rendering process of web pages, slowing down page load times and user experience. Strategies to tackle this include deferring non-critical CSS, eliminating render-blocking JavaScript with ‘defer’ and ‘async’ attributes, removing unused CSS/JS, splitting code into smaller bundles, and minifying files. WP Rocket offers easy solutions to eliminate render-blocking resources by providing features like ‘Minify/Combine CSS files’, ‘Optimize CSS Delivery’, and ‘Load JavaScript deferred’. These features help to minimize, combine and defer the loading of CSS/JS files, which reduces the impact of render-blocking resources.

Conclusion:

Encountering a “Core Web Vitals Assessment Failed” notification on your WordPress site may initially seem like a setback, but it’s a challenge that can be overcome. By implementing the right strategies, you can improve your website’s performance and conquer the Core Web Vitals metrics.

To begin, it’s important to understand the three key metrics of Core Web Vitals: LCP, FID, and CLS. These metrics evaluate the loading speed, interactivity, and visual stability of your site, respectively.

To address these metrics, there are several proven methods you can follow. Firstly, optimize your page loading speed by improving web hosting, utilizing caching plugins, and optimizing images and videos. Content Delivery Networks (CDNs) and lazy loading can also enhance the loading speed.

For interactivity, optimize JavaScript, remove unused scripts, and ensure your server responds quickly. By improving Total Blocking Time (TBT) between FCP and TTI, you can enhance FID.

To enhance visual stability, add dimensions to elements, eliminate render-blocking elements, specify image dimensions, place ads properly, and optimize web fonts.

Optimizing plugins and themes, focusing on mobile usability, and selecting appropriate hosting providers are also essential steps to prioritize Core Web Vitals.

Measuring Core Web Vitals on your WordPress site can be done using tools such as Google Search Console, PageSpeed Insights, Lighthouse, WebPageTest, and Chrome DevTools. These tools provide insights into your site’s performance and metrics, helping you identify areas for improvement.

To pass Core Web Vitals in WordPress while addressing PageSpeed Insights issues, you can optimize LCP, CLS, and TBT. Techniques include compressing and preloading images, serving images from CDNs, reducing server response time, deferring and minifying JavaScript, using lightweight themes, leveraging caching strategies and CDNs, and avoiding unnecessary plugins.

To reduce the impact of third-party code, identify and remove unused scripts, optimize script loading, self-host resources, establish early connections, and avoid document.write() scripts, and use third-party script management tools. Implementing a performance budget can help track the impact of third-party scripts.

For improving First Input Delay (FID), reduce JavaScript execution, break up long tasks, remove unused polyfills, optimize server response time, cache assets, control content visibility, and review third-party scripts.

To avoid large layout shifts and improve Cumulative Layout Shift (CLS), specify image dimensions, use aspect ratios, reserve space for ads and embeds, use min-height to reserve space, preload web fonts, optimize JavaScript elements, avoid content hiding on page load, be mindful of CSS/JS animations, and utilize tools like Lighthouse and Web Vitals JS Library.

By implementing these strategies and techniques, you can optimize your WordPress site’s Core Web Vitals, providing an exceptional user experience for your visitors. With determination and the right approach, you can overcome any Core Web Vitals challenges and see your site perform like a champion.

Share This Article
Follow:
Dibbyyan Nath is a well-known entrepreneur, philanthropist, and the Chief Creative Officer of Inteliqo Research and Services. Mr. Nath, over the past two decades, has donned a lot of hats, while writing has remained his first love. Now he aims to express his experiences, as the head of a digital marketing, content creating, and website development company, through his love for writing. To keep up with the young entrepreneur and his thoughts
Leave a comment