What Is Google‘s INP Score and How to Improve It in WordPress

Are you wondering what Google‘s INP score is and how to improve it on your WordPress website? As an experienced WordPress developer, I can tell you that optimizing your INP score should be a top priority.

Interaction to Next Paint (INP) is a new Core Web Vitals metric that measures how responsive your site is based on the time from user interaction to visual feedback.

In this comprehensive guide, we‘ll explain what Google‘s INP score is, why it matters, how to measure it, and most importantly – how to optimize it in WordPress.

Why Google INP Score Matters for Web Performance

As a developer with over 15 years of experience in web performance optimization, I‘ve seen firsthand how quickly a site can go from feeling snappy to frustratingly slow.

Google‘s introduction of the INP metric for Core Web Vitals is a game-changer.

INP provides a more holistic view of site responsiveness across all user interactions, whereas First Input Delay (FID) only measured the first interaction on a page.

With INP being incorporated into Google‘s ranking algorithms starting in 2024, improving your website‘s INP score should be a top focus for site owners and developers alike.

Users have come to expect instant visual feedback after clicking, tapping, or submitting forms on a webpage. Sites that feel sluggish or unresponsive tend to have higher bounce rates and lose visitors.

According to Google‘s research, sites with the best INP scores retain on average 22% more visitors compared to sites with poor INP scores.

So if you want to deliver the best user experience and maximize conversions, then optimizing INP is essential.

How Google Measures INP in Core Web Vitals

INP stands for Interaction to Next Paint. This metric measures the time (in milliseconds) from a user interaction like tapping or clicking to the next visual change or update in response to that interaction.

For example, when a user:

  • Clicks a button
  • Taps an image to enlarge it
  • Submits a form
  • Selects a dropdown
  • Clicks to open a modal

The INP test measures how long it takes for visual feedback to appear after the interaction. This visual change is referred to as the "next paint".

Google measures this time across all user interactions and assigns an overall INP score for the page.

INP Score Ratings:

  • Good – under 200 ms
  • Needs Improvement – 200 ms to 500 ms
  • Poor – over 500 ms

The optimal target is under 100 ms for the fastest interactivity.

Google provides separate INP scores for both mobile and desktop users. Be sure to check both, as mobile scores tend to be higher.

Measuring Your Site‘s INP Score

You can easily test your webpage‘s INP score using Google PageSpeed Insights.

Just enter a URL and inspect the INP metric in the results:

Measuring INP in PageSpeed Insights

This page has an INP of 42 ms on desktop and 53 ms on mobile. The green dot indicates a good score.

Review your INP scores regularly and compare them over time to see if performance improvements are having an impact.

Now let‘s get into how to optimize that score.

How to Improve Your Google INP Score

Optimizing your INP score requires web developers to improve JavaScript code performance. However, as a site owner there are still wins you can achieve.

Follow this 7 step process to optimize your site‘s INP score:

1. Update to the Latest WordPress Version

Upgrading to the newest WordPress version will ensure you are running a fast PHP codebase. Versions 6.1+ have significant speed optimizations.

2. Limit Background Processing

Background processes like cron jobs can delay response to user input. Eliminate any unnecessary scripts and limit background workload.

3. Follow PageSpeed Recommendations

Fix any recommendations such as removing render-blocking resources and unused CSS/JS.

4. Minify JavaScript Files

Minifying JavaScript can shave off a few milliseconds in download time. Use a plugin like WP Rocket or enable this in your caching plugin.

5. Ask Your Developers to Optimize JS Code

This is where the biggest speed gains happen. See the next section for tips to share with your dev team.

6. Consider a JavaScript Library Like React

If building complex interactions, using a library like React instead of jQuery can result in faster rendering and smoother animation.

7. Test on Mobile & Low-Power Devices

Conduct INP testing on slow mobile connections and lower-end devices. This is likely where poor INP scores originate.

Now let‘s look at the key JavaScript code optimizations developers should focus on.

JavaScript Code Optimization Tips for Developers

Significant INP improvements will require JavaScript performance tuning. Here are 7 tips:

1. Provide Immediate Visual Feedback

When a user interacts with an element, immediately update the UI to acknowledge their input before processing the action. Show a spinner, message, color change, or loading state.

2. Prioritize Work – Visual Updates First

Render visual feedback in response to input before any non-essential work. Use requestIdleCallback() to schedule lower priority work after visuals update.

3. Schedule Visual Updates Before Next Paint

Use requestAnimationFrame() to schedule visual updates to run before the next paint. This ensures smoother animations and transitions.

4. Avoid Layout Thrashing

Batch DOM reads and writes to avoid repeated layout calculations. For example, avoid interleaving reads and writes.

5. Load Critical Resources First

Load above-the-fold content and necessary code first. Lazy load below-the-fold images/videos and non-critical JavaScript.

6. Optimize Long Tasks Over 50ms

In Chrome DevTools, find and optimize any JavaScript tasks over 50ms that block input response.

7. Reduce Overall JavaScript Processing Time

Locate areas where most time is spent and optimize those hot functions/components. Reduce expensive operations.

Here is an example of optimizing a button click by providing immediate visual feedback:

// Bad
button.addEventListener(‘click‘, () => {
  // Long CPU-heavy task
  processOrder(); 

  // Update UI 
  button.textContent = ‘Completed!‘;
})

// Good
button.addEventListener(‘click‘, () => {

  // Update UI immediately 
  button.textContent = ‘Processing...‘; 

  // Long CPU-heavy task
  setTimeout(() => {
    processOrder();

    // Final update
    button.textContent = ‘Completed!‘; 
  }, 0);

})

This pattern dramatically improves INP by acknowledging the user‘s click before the time-consuming process runs.

INP Optimization Should Be an Ongoing Priority

With INP being a key component of Google‘s page experience ranking factors starting in 2024, improving your website‘s score needs to be an ongoing priority.

As a site owner, follow the performance tips in this guide and work with your developers to identify areas for JavaScript optimization.

Developers should regularly inspect interaction times using DevTools and fix long tasks over 50ms. Code should always provide immediate visual feedback in response to user input before processing.

By making INP optimization a priority over the coming months, you can delight visitors with the fastest and most responsive WordPress site possible.

Written by Jason Striegel

C/C++, Java, Python, Linux developer for 18 years, A-Tech enthusiast love to share some useful tech hacks.