Remove Unused JavaScript Code

How to optimize ambarsthan.happythoughts.in

Next.js SiteScore: 66/100Analyzed May 2026Re-analyze this site

Remove Unused JavaScript Code

Medium Impact+12 points estimated

Why It Matters

203 KiB of unused JavaScript is delaying interactivity and wasting 910ms of processing time.

How to Fix

Use Next.js bundle analyzer to identify unused code in your chunks. Remove unused Google Tag Manager features and implement code splitting for components below the fold. Update your Next.js build target to exclude legacy polyfills since you're already using modern JavaScript features.

0Needs Improvement

What This Score Means

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

13.7s
Poor

Good: < 2.5s

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

INP

Interaction to Next Paint

248ms
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 66/100, primarily due to extremely slow loading times with a Largest Contentful Paint of 13.7 seconds. The biggest issue is unoptimized images – three large PNG files are consuming over 800KB and lack modern formats like WebP, while also being served at higher resolutions than needed for display. The site would benefit significantly from converting images to WebP/AVIF format, implementing proper responsive images, and adding preconnect hints for external domains, which together could save over 1.5MB in download size and reduce load times by several seconds. Additionally, removing 200KB of unused JavaScript and optimizing render-blocking CSS resources would further improve the user experience.

Other Optimization Recommendations

Optimize Images with Modern Formats

High Impact+25 points estimated

Why It Matters:

Three large PNG images (818 KiB) are delaying LCP by 4.1 seconds and account for 25% of total page weight.

How to Fix:

Convert the video thumbnail PNGs to WebP/AVIF format using Next.js Image component with quality=75. Resize images to match display dimensions (665x374 instead of 768x432). Add responsive srcSet for different screen sizes using Next.js built-in optimization.

Add Critical Resource Preconnections

High Impact+18 points estimated

Why It Matters:

Missing preconnect hints to external domains waste 912ms during LCP discovery phase.

How to Fix:

Add <link rel='preconnect' href='https://api.happythoughts.in'> and <link rel='preconnect' href='https://cdn.happythoughts.in'> to your Next.js _document.js head section. Add fetchpriority='high' to the hero image component to prioritize LCP element loading.

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