HomeBlogWebsite Performance Audit: A Complete Developer...

Engineering Guide · 10 min read · May 30, 2026

Website Performance Audit: A Complete Developer Checklist

Guessing at performance fixes—installing random caching plugins or upgrading server RAM—rarely solves slow conversion funnels. This step-by-step developer performance audit isolates TTFB server bottlenecks, database N+1 queries, LCP asset delays, and INP main-thread blocking using reproducible measurements.

Author
Smit Desai
Published
May 30, 2026
Read time
10 min read
Topic
Security & SEO
Services
Custom Web · Mobile Apps · All Services

Every few weeks, a founder reaches out after paying for a bigger cloud server only to discover their checkout or dashboard still feels sluggish. Throwing CPU and RAM at an unprofiled web application is one of the most expensive habits in software. If a single category page executes 140 unindexed SQL queries and ships 1.8 MB of render-blocking JavaScript, doubling your instance size barely nudges p95 latency.

After optimizing architectures across 170+ client projects and managing 300+ WordPress sites at server level, I run performance audits strictly from first byte to final paint. Measure where milliseconds actually go, fix the slowest layer first, and validate every change with before-and-after traces.

Step 1: Separate Lab Noise From Field Reality

Before touching code, establish an honest baseline across the metrics Google tracks under Core Web Vitals:

Metric Healthy Target Primary Root Causes When Failing
TTFB (Time to First Byte) <= 600ms (ideally < 200ms cached) Cold PHP/Node workers, N+1 SQL queries, synchronous third-party API calls, no edge cache.
LCP (Largest Contentful Paint) <= 2.5s Uncompressed hero images, loading="lazy" on above-the-fold hero <img>, render-blocking CSS/fonts.
INP (Interaction to Next Paint) <= 200ms Oversized JS hydration bundles, heavy third-party tag managers, unthrottled scroll/input handlers.
CLS (Cumulative Layout Shift) <= 0.1 Images/embeds missing width and height, web fonts swapping late, banners pushing content down.

Capture baseline numbers using Chrome User Experience Report (CrUX) data in PageSpeed Insights for field behavior, and Chrome DevTools Performance traces throttled to 4x CPU slowdown + Fast 3G for reproducible local debugging.

Step 2: Audit Backend Execution and Database Queries (TTFB)

If the server takes 1.4 seconds just to return HTML, no frontend optimization can rescue LCP. Inspect your slowest controller actions and database traces first.

Hunt Down N+1 Queries and Missing Composite Indexes

ORM convenience hides expensive query multipliers. Loading 25 projects and accessing $project->client->name inside a template loop triggers 26 separate database round trips. Enable query logging in staging (or Laravel Pulse / Telescope / pg_stat_statements) and inspect any request exceeding 15–20 queries.

Even more common on mature apps is missing composite indexes on WHERE + ORDER BY clauses. Run EXPLAIN (ANALYZE, BUFFERS) directly against realistic data volumes:

EXPLAIN (ANALYZE, BUFFERS)
SELECT id, title, published_at
FROM posts
WHERE tenant_id = '9f1c2e7a-4b11-4c22-8f1a-1234567890ab'
  AND status = 'published'
ORDER BY published_at DESC
LIMIT 20;

If you see Seq Scan or high Buffers: shared read on a large table, add a matching partial or composite index:

CREATE INDEX CONCURRENTLY idx_posts_tenant_published
ON posts (tenant_id, published_at DESC)
WHERE status = 'published';

Eliminate Synchronous External Calls From Request Paths

Never wait on SMTP servers, PDF generators, webhook dispatches, or third-party CRM syncs during an HTTP GET or POST request. Push them onto Redis-backed background queues so user-facing controllers write to the database and return immediately.

Check Runtime and Cache Configuration

Verify fundamental server hygiene:

  • PHP OPcache & JIT: Confirm opcache.enable=1 and opcache.validate_timestamps=0 (with graceful PHP-FPM reload on deploy) so PHP is not re-parsing files per request.
  • Laravel config/route caching: Production deployments must run php artisan config:cache, route:cache, and view:cache.
  • Object caching: Memoize expensive permission trees, navigation menus, and currency tables in Redis rather than rebuilding them per page view.

Step 3: Optimize Asset Delivery, Images, and Caching Headers (LCP)

Once HTML arrives quickly, inspect the Chrome DevTools Network waterfall to see why the Largest Contentful Paint element waits.

Fix Critical-Path Images and Fonts

Two mistakes account for most slow LCP scores:

  1. Lazy-loading the hero image: Adding loading="lazy" to the main above-the-fold hero banner tells the browser to delay fetching it until layout completes. Set loading="eager" and fetchpriority="high" on the hero <img>, serve AVIF/WebP via <picture> or responsive srcset, and always declare explicit width and height.
  2. Unpreloaded self-hosted fonts: Host WOFF2 fonts on your own origin instead of chaining requests through external font stylesheets, use font-display: swap, and subset character ranges to strip unused glyphs.

Enforce Edge Compression and Immutable Asset Caching

Static Vite or Webpack hashed bundles (/build/assets/app-8f2a9c.js) never change at that URL. Cache them aggressively for a full year, while keeping HTML responses short-lived or edge-revalidated:

# Enable Brotli/Gzip compression and long-lived caching for hashed assets
location ~* ^/build/assets/.*\.(js|css|woff2|webp|avif)$ {
    add_header Cache-Control "public, max-age=31536000, immutable";
    access_log off;
}

# Revalidate HTML documents on every navigation (or configure short edge TTL)
location / {
    add_header Cache-Control "no-cache, must-revalidate";
    try_files $uri $uri/ /index.php?$query_string;
}

Step 4: Trim Main-Thread JavaScript and Third-Party Scripts (INP)

Google replaced FID with Interaction to Next Paint (INP), which exposes bloated frontend bundles immediately. Users tap a filter dropdown or "Add to Cart" button and feel a frozen UI because the browser's main thread is busy hydrating megabytes of JavaScript.

  • Inspect your bundle treemap: Run npx vite-bundle-visualizer or webpack analyzer. Common culprits include shipping full moment.js locales, un-tree-shaken icon packs, or charting libraries bundled into public marketing pages that never render a chart.
  • Code-split heavy routes: Lazy-load rich text editors, PDF viewers, and admin data tables only on routes that mount them.
  • Quarantine marketing pixels: Chat widgets, heatmaps, and analytics tags routinely steal hundreds of milliseconds of main-thread execution during page load. Defer non-essential scripts until user interaction or requestIdleCallback, and audit tag managers quarterly—just as Google's SEO Starter Guide emphasizes fast, crawlable pages over bloated script stacks.

Step 5: Verify Concurrency, Queues, and Failure Modes

A site that loads in 300ms for one user can still collapse during a campaign email blast or Black Friday spike. Before signing off on an audit:

  1. Test under realistic concurrency: Run a targeted k6 or hey load test against key read and write endpoints to verify PHP-FPM pm.max_children, Node worker counts, and PostgreSQL connection limits (max_connections / PgBouncer) do not exhaust under burst load.
  2. Audit queue backpressure: Confirm failed jobs go to a dead-letter queue with alerts, and long-running imports cannot starve transactional password-reset or checkout email queues.
  3. Check CDN cache hit ratios: Review Cloudflare or CloudFront analytics to verify static assets and cacheable public pages are actually hitting edge POPs rather than bypassing cache due to stray tracking cookies (utm_*, fbclid).

If your stack suffers from years of accumulated frontend plugins, outdated PHP/Node runtimes, or brittle database schemas, incremental tweaks eventually hit diminishing returns. Pairing targeted fixes with a clean legacy software upgrade or architectural cleanup (alongside security checks from our complete Laravel security audit checklist) gives your team a platform that stays fast as features grow.

Turn Slow Pages Into Faster Conversions

Performance engineering is a revenue lever, not a vanity Lighthouse badge. Faster TTFB, responsive interactions, and stable layouts lift paid ad ROAS, organic rankings, and checkout completion simultaneously. Whether you need a focused diagnostic and remediation sprint at $55/day (8–9 hours of dedicated engineering work), ongoing full-stack velocity at $1,999/month, or a lean $399 7-day business website built cleanly without bloat, SmitDev optimizes for measurable production speed.

Ready to eliminate bottlenecks across your database, server edge, and frontend bundle? Check out our engineering services or contact SmitDev to schedule a hands-on performance audit.

Written by Smit Desai · Principal Full-Stack & FDSE

8+ years shipping production systems · 171 case studies · 300+ WordPress servers managed for Finland partners.

Next Steps and Recommended Resources

Next Steps · Recommended Resources

Pillar 1 · Infrastructure Proof

300+ WordPress & Cloud Server Fleet

From server-level management of 300+ WordPress sites for a Finland client to PostgreSQL query tuning (3,982 -> 52 queries).

Pillar 2 · Legacy Rescue

Upgrade Old Software (10 Hrs Free)

Audit bottlenecks, eliminate security vulnerabilities, and stabilize production servers—starting with 10 free engineering hours.

01 — Frequently asked questions

security & seo

Why do Lighthouse lab scores look green while real users still experience a slow site?

Lighthouse runs on a cold, single-page simulated device without authenticated session state, ad blockers, or real network variance. Always pair lab profiling with real-user monitoring (CrUX field data) for LCP, INP, and CLS.

What is a healthy Time to First Byte (TTFB) target for dynamic web apps?

Aim for under 200ms at the edge for cached marketing pages and under 400–600ms for authenticated server-rendered pages. Once TTFB crosses 800ms, hitting the 2.5-second Largest Contentful Paint threshold becomes difficult on mobile networks.

Does switching from shared hosting to a bigger VPS fix slow PHP or Node apps?

Not if the bottleneck is unindexed SQL queries, missing OPcache, synchronous external API calls during page render, or N+1 ORM loops. More CPU cores only delay the crash under concurrency until the underlying queries are fixed.

How does SmitDev structure a website performance audit?

We split the audit across network edge, backend execution/SQL, and browser main-thread rendering, deliver prioritized fixes ranked by impact on Core Web Vitals and revenue routes, and verify gains against baseline traces.

03 — Have an engineering need?

hire the right expertise

Let's talk tech.

Deciding between an embedded forward deployed engineer or a senior full stack developer? Share your technical context and timeline.

Solitaire Corporate Park, Makarba, Ahmedabad, Gujarat 380015, India · IST (UTC+5:30) · --:-- IST · Mon–Fri 09:00–18:00 IST · US & EU overlap daily

No newsletter, no CRM. Just a reply.