Speed Score
An automated performance auditing toolkit for Shopify stores that runs Lighthouse, captures Core Web Vitals, and tracks performance regressions in CI — purpose-built for the Shopify platform.
Shopify theme updates frequently introduce performance regressions that go unnoticed until they impact conversion rates. Standard Lighthouse runs don't account for Shopify-specific factors: app script bloat, theme asset loading, Shopify CDN caching behavior, and dynamic section rendering.
Built a Playwright-based testing framework that runs Lighthouse audits against real Shopify storefronts, captures Real User Metrics via the Web Vitals API, generates trend reports, and blocks deployments that exceed performance budgets — all configured via a single YAML file.
1export async function runShopifyAudit(2 config: AuditConfig3): Promise<AuditReport> {4 const browser = await playwright.chromium.launch()5 const context = await browser.newContext({6 userAgent: config.userAgent ?? MOBILE_CHROME,7 viewport: { width: 412, height: 915 },8 })910 const page = await context.newPage()1112 // Capture Web Vitals before Lighthouse13 await injectWebVitalsCollector(page)14 await page.goto(config.url, { waitUntil: 'networkidle' })1516 const realMetrics = await page.evaluate(() =>17 window.__WEB_VITALS_RESULTS__18 )1920 // Run Lighthouse via CDP21 const cdp = await context.newCDPSession(page)22 const lighthouseReport = await runLighthouse(cdp, config.url, {23 throttling: config.throttling ?? SHOPIFY_3G_PROFILE,24 categories: ['performance'],25 })2627 // Shopify-specific analysis28 const appScripts = await detectThirdPartyApps(page)29 const themeAssets = await analyzeThemeBundle(page)3031 await browser.close()3233 return {34 url: config.url,35 timestamp: new Date().toISOString(),36 lighthouse: lighthouseReport,37 webVitals: realMetrics,38 shopify: { appScripts, themeAssets },39 budget: evaluateBudget(config.budgets, lighthouseReport),40 }41}42
Interested in similar work?
Let's discuss how I can help bring your Shopify project to life.