Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Lighthouse Php Laravel Package

spatie/lighthouse-php

Run Google Lighthouse audits from PHP. Test any URL and retrieve category scores (performance, accessibility, SEO, etc.) and individual audit details. Configure headers, user agent, categories, CPU throttling, and max load wait, then run and parse results.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Automated Web Quality Assurance: Integrate Lighthouse audits into CI/CD pipelines to enforce performance, accessibility, and SEO standards before deployment, reducing manual QA effort.
  • Data-Driven Optimization: Embed Lighthouse metrics into dashboards (e.g., Grafana, custom admin panels) to track regressions and prioritize fixes with quantifiable impact.
  • Progressive Web App (PWA) Adoption: Automate PWA compliance checks (e.g., service worker registration, manifest validation) to accelerate feature rollouts.
  • SEO & Compliance: Use Lighthouse’s SEO audits to validate schema markup, mobile-friendliness, and other ranking factors in real-time, aligning with marketing goals.
  • Cost Savings: Replace ad-hoc manual audits or third-party tools (e.g., WebPageTest) with a PHP-native solution, reducing external dependencies and licensing costs.
  • Roadmap Prioritization: Leverage historical Lighthouse data to identify recurring issues (e.g., slow third-party scripts) and justify technical debt investments.
  • Build vs. Buy: Avoid reinventing Lighthouse integration wheels; this package provides a battle-tested, PHP-first abstraction over Chrome’s CLI tool.

When to Consider This Package

  • Adopt when:

    • Your stack is PHP/Laravel and you need server-side Lighthouse execution (e.g., headless environments, cron jobs, or APIs).
    • You require programmatic access to Lighthouse results (e.g., storing scores in a database, triggering alerts).
    • Your team lacks JavaScript/Node.js expertise but needs to automate web quality checks in CI (e.g., GitHub Actions).
    • You’re building a SaaS platform where clients need audited performance metrics (e.g., white-label reporting).
    • You want to standardize audits across microservices or multi-tenant apps without duplicating tooling.
  • Look elsewhere if:

    • You need real-user monitoring (RUM) or synthetic testing (consider tools like Calibre, SpeedCurve, or Chrome UX Report).
    • Your primary use case is visual regression testing (use Percy or Applitools instead).
    • You’re already using a Node.js-based Lighthouse solution (e.g., lighthouse-ci) and prefer ecosystem parity.
    • Your team lacks PHP resources to maintain the integration (e.g., handling Chrome binary dependencies).
    • You need advanced Lighthouse features (e.g., custom audits, throttling profiles) not yet supported by this package.

How to Pitch It (Stakeholders)

For Executives:

"This package lets us automate Google Lighthouse audits—performance, accessibility, SEO, and PWA checks—directly in our PHP/Laravel stack. By integrating it into our CI pipeline, we’ll catch critical issues before they reach users, reducing bounce rates and improving SEO rankings. It’s a low-cost, high-impact way to enforce web best practices at scale, with no need for external tools or manual QA. Think of it as ‘autopilot for web quality.’"

Key Outcomes:

  • Faster releases (blockers caught early).
  • Higher conversion rates (better performance/accessibility).
  • Lower support costs (fewer user-reported issues).

For Engineering Teams:

*"Spatie’s lighthouse-php gives us a PHP-friendly way to run Lighthouse programmatically. Here’s why it’s a win:

  • No Node.js dependency: Runs Chrome via PHP’s process execution (e.g., exec()), avoiding Node.js toolchain overhead.
  • CI/CD ready: Plugs into Laravel’s testing or deployment workflows (e.g., fail builds if performance drops below thresholds).
  • Extensible: Hook into Laravel events (e.g., job:failed) or queue audits for async processing.
  • Data-rich: Access raw Lighthouse JSON or aggregate scores (e.g., store in PostgreSQL for trend analysis).

Example Use Cases:

  • Pre-deploy checks: php artisan lighthouse:audit --url=https://staging.example.com in your deploy.php.
  • Scheduled monitoring: Cron job to email devs when accessibility scores dip.
  • Feature flags: Gate PWA rollouts until Lighthouse confirms service worker registration.

Trade-offs:

  • Requires Chrome binary on the server (Docker-friendly).
  • Limited to Lighthouse’s native audits (no custom JS plugins yet).

Next Steps:

  1. Spin up a proof-of-concept in staging.
  2. Define success metrics (e.g., ‘reduce critical issues by 30% in 3 months’).
  3. Align with the QA team on audit thresholds (e.g., ‘fail if performance < 90’)."*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport
twbs/bootstrap4