Remove Unused JavaScript Code

How to optimize olecams.com

Next.js SiteScore: 47/100Analyzed January 2026

Remove Unused JavaScript Code

High Impact+25 points estimated

Why It Matters

645 KiB of unused JavaScript delays LCP by 2.55 seconds and blocks user interactions.

How to Fix

Use Next.js dynamic imports to code-split large components. Run 'npx next build --analyze' to identify unused chunks. Implement tree-shaking by importing only needed functions from libraries instead of entire packages. Configure webpack-bundle-analyzer to remove dead code from your build.

0Poor

What This Score Means

A score of 47 falls in the "Poor" 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

11.4s
Poor

Good: < 2.5s

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

INP

Interaction to Next Paint

406ms
Needs Improvement

Good: < 200ms

Measures how quickly the page responds to user interactions

CLS

Cumulative Layout Shift

0.00
Good

Good: < 0.1

Measures visual stability - how much content shifts during page load

AI Performance Analysis

This Next.js site has poor performance with a score of 47/100, indicating significant user experience issues. The biggest problem is excessive JavaScript blocking the page, with 6.1 seconds of main-thread work and 645 KiB of unused JavaScript code that's delaying your Largest Contentful Paint by 2.6 seconds. Additionally, the site has an unnecessary redirect that wastes 760ms on every page load, and the page takes a painfully long 16 seconds to become fully interactive. Removing unused JavaScript, eliminating the redirect, and optimizing your Next.js bundle could improve your score by 30+ points and dramatically speed up the site.

Other Optimization Recommendations

Fix Page Redirects Chain

High Impact+15 points estimated

Why It Matters:

Multiple redirects add 760ms delay to both LCP and FCP metrics.

How to Fix:

Update your Next.js configuration to serve the Spanish version directly without redirects. In next.config.js, configure proper locale routing with 'redirect: false' for the default locale. Update internal links to point directly to '/es' URLs instead of root paths that redirect.

Reduce JavaScript Execution Time

High Impact+12 points estimated

Why It Matters:

2.7 seconds of JavaScript execution creates 1.25 seconds of Total Blocking Time.

How to Fix:

Split large Next.js chunks using dynamic imports with loading states. Move third-party scripts like Clarity and GTM to load after page interactive using Next.js Script component with strategy='lazyOnload'. Optimize React components by implementing React.memo() for heavy rendering components.

Want to Analyze YOUR Website?

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

More Next.js Speed Tests

Next.js Performance Resources

Frequently Asked Questions

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