Fix JavaScript Forced Reflows

How to optimize ajfoods.fr

Shopify SiteScore: 55/100Analyzed May 2026Re-analyze this site

Fix JavaScript Forced Reflows

Medium Impact+8 points estimated

Why It Matters

Forced reflows waste 774ms of main thread time, blocking user interactions and increasing TBT.

How to Fix

Optimize header.js and theme.js to batch DOM reads and writes. Cache geometric properties like offsetWidth instead of repeatedly querying them. Use requestAnimationFrame for layout-triggering operations in your Shopify theme scripts.

0Needs Improvement

What This Score Means

A score of 55 falls in the "Needs Improvement" range (50-89). While it is better than poor (0-49), you should aim for 90+ to provide an optimal user experience and maximize SEO benefits.

This site is slower than approximately 35% of similar sites. The main issues affecting performance are image optimization, JavaScript execution time, and layout stability.

Addressing these issues could improve your conversion rate by 15-20% and boost your search engine rankings.

Core Web Vitals Analysis

LCP

Largest Contentful Paint

4.6s
Poor

Good: < 2.5s

Measures how long it takes for the main content to appear on screen

INP

Interaction to Next Paint

319ms
Needs Improvement

Good: < 200ms

Measures how quickly the page responds to user interactions

CLS

Cumulative Layout Shift

0.01
Good

Good: < 0.1

Measures visual stability - how much content shifts during page load

AI Performance Analysis

This Shopify site has poor performance with a score of 55/100, indicating significant user experience issues. The biggest problem is excessive unused CSS and JavaScript code - nearly 80% of the main stylesheet (19KB) and 88% of vendor scripts (76KB total) are unnecessary, which is severely slowing down page loading and causing a sluggish 4.6-second Largest Contentful Paint. The site is also suffering from forced reflows that are blocking user interactions for 850ms, making the page feel unresponsive. Cleaning up unused code, optimizing JavaScript execution, and fixing layout thrashing could easily improve the performance score by 30+ points and dramatically enhance the shopping experience.

Other Optimization Recommendations

Remove Unused JavaScript Code

High Impact+18 points estimated

Why It Matters:

76 KiB of unused JavaScript delays LCP by 200ms and blocks user interactions.

How to Fix:

In your Shopify theme, audit vendor.js and remove unused libraries through theme customization. Split the 64KB WPM script to load only required modules. Use Shopify's Script Tag API to conditionally load scripts based on page type.

Eliminate Unused CSS Rules

High Impact+12 points estimated

Why It Matters:

19 KiB of unused CSS delays both FCP and LCP by 150ms each.

How to Fix:

Use Shopify's theme inspector to identify unused CSS in theme.css. Remove styles for unused sections and components through the theme editor. Consider splitting CSS by page template to load only necessary styles per page type.

Keep Your Site Fast After Optimization

Once your site is optimized, maintain that speed. Use DeployHQ for zero-downtime, automated deployments—so performance fixes and updates go live safely every time, without breaking your site.

Explore DeployHQ →Trusted by engineering teams shipping high-performance sites

Want to Analyze YOUR Website?

Get AI-powered performance insights with actionable fixes in 30 seconds

More Shopify Speed Tests

Shopify Performance Resources

Frequently Asked Questions