Remove Unused JavaScript Code

How to optimize capriprivateboattours.com

Next.js SiteScore: 62/100Analyzed April 2026Re-analyze this site

Remove Unused JavaScript Code

High Impact+25 points estimated

Why It Matters

266 KiB of unused JavaScript is delaying LCP by 450ms and blocking the main thread.

How to Fix

Use Next.js dynamic imports to code-split components and defer Google Analytics/GTM loading. Audit and remove unused PostHog features. Configure your build to only include essential tracking scripts on page load, loading others after user interaction.

0Needs Improvement

What This Score Means

A score of 62 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

6.4s
Poor

Good: < 2.5s

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

INP

Interaction to Next Paint

262ms
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 62/100, indicating significant room for improvement. The biggest problem is excessive unused JavaScript from Google tracking scripts (Google Analytics and Tag Manager), which is wasting 260 KiB and delaying your Largest Contentful Paint by 6.4 seconds - well above the recommended 2.5 seconds. Your site is also suffering from render-blocking CSS files and inefficient caching policies that could save an additional 133 KiB on repeat visits. Removing or deferring unused JavaScript, optimizing your tracking implementation, and improving cache settings could boost your performance score by 25+ points and dramatically improve user experience.

Other Optimization Recommendations

Optimize Hero Image Delivery

High Impact+20 points estimated

Why It Matters:

The hero image has poor caching (1 hour) and is causing LCP delays of 1.2 seconds.

How to Fix:

Increase Supabase storage cache headers to 1 year for static images. Optimize the hero image compression to reduce 27 KiB waste. Use Next.js Image component with priority={true} and proper sizing to eliminate render blocking.

Eliminate Render Blocking CSS

Medium Impact+15 points estimated

Why It Matters:

CSS files are blocking First Contentful Paint by 500ms, delaying initial page rendering.

How to Fix:

Inline critical CSS for above-the-fold content in your Next.js pages. Use next/dynamic with { ssr: false } for non-critical components. Split CSS chunks and load non-essential styles asynchronously using media='print' onload trick.

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 Next.js Speed Tests

Next.js Performance Resources

Frequently Asked Questions