Weave 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

Laravel Google Lighthouse Laravel Package

logiek/laravel-google-lighthouse

Run Google Lighthouse audits directly from your Laravel app. Generate performance, accessibility, SEO, and best-practices reports programmatically, with a clean API for automating audits and storing results.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. The package is a thin Laravel wrapper around Google Lighthouse, which is a Node.js CLI that drives headless Chrome. That means the actual audit engine is not PHP and is not vendored — the Laravel side contributes a service provider, a config file, a fluent facade-style API, an Artisan command, score-threshold assertions, and JSON report parsing. Architecturally this is a convenience layer over an out-of-process binary, so the package occupies the "orchestration and result parsing" slot in your stack, not the "audit engine" slot. It fits cleanly only where a Laravel application already has (or can be given) Node.js and a Chrome/Chromium binary on the same host or image.

Integration feasibility. High on a Laravel 9/10 application, provided node, npm/npx, and a Chrome binary are present and the Composer constraints still resolve. Low-to-blocked on Laravel 11/12: the last release (2023-08-10) predates Laravel 11, and the package is archived, so no compatibility release is coming. Feasibility is also poor for anything that expects to run audits inside a web request — the runtime cost and process-spawning model push this toward queue workers or CI runners.

Technical risk. This is the dominant concern and it is structural, not incidental. Four risks compound:

  • Archived status. No security patches, no Laravel compatibility updates, no issue triage. The package will silently rot against framework and PHP upgrades. Effectively you are adopting a snapshot you may need to fork.
  • Runtime surface area. Adopting a PHP package now also means owning Node and Chromium versions, Chrome sandbox flags, and headless-mode quirks in every environment where it runs. That is a materially larger operational commitment than the Composer footprint suggests.
  • Measurement volatility. Lighthouse scores vary with machine load, network conditions, and Chrome version. Thresholds used as CI gates will produce flakes unless the environment is pinned and stabilized.
  • Adoption signal. Five stars and an archived repo mean almost no community validation; you will be the primary user of every edge case.

Key questions. Which Laravel and PHP versions are actually in the Composer constraints, and does it install on our target stack today? Does the audit run as a subprocess (npx lighthouse) at call time, and is there a timeout/queue story? Which Chrome and Node versions does it assume, and are those pinned anywhere? Are score thresholds exposed as test assertions suitable for CI gating, or only as return values? What does the raw JSON parsing do when Lighthouse emits partial or errored reports? Who forks it if we need a Laravel 11+ compatibility patch — and is that cheaper than invoking the Lighthouse CLI directly from our own code?

Integration Approach

Stack fit. Best fit is a Laravel 9/10 service that already ships a container image with Node and headless Chrome — typically because it already runs frontend builds or browser-based tests. Worst fit is a slim PHP-FPM image on a managed platform where you cannot add system binaries. The package's natural home is a CI job or a dedicated audit worker, not the request/response path of a customer-facing app.

Migration path. Greenfield adoption is a single composer require plus a published config file. For teams already calling Lighthouse directly via shell scripts, the migration is a like-for-like swap: replace shell invocations with the Artisan command or fluent API, keep the same thresholds, and diff the JSON output for a release or two before deleting the old scripts. There is no data migration and no schema change; the only state is whatever you choose to persist from the reports.

Compatibility. Treat the supported window as Laravel 9/10 and whatever PHP versions the 2023 constraints allow — verify, do not assume. Because the package is archived, plan for it to be the last thing you upgrade, and expect it to become the blocker on your next framework major. Verify Chrome availability with /usr/bin/chromium vs /usr/bin/google-chrome differences and the --no-sandbox requirement in containerized environments; this is the most common first-run failure.

Sequencing.

  1. Timeboxed spike: install in a throwaway Laravel 9/10 app, run one audit against a known URL, confirm scores and JSON shape.
  2. Harden the environment: pin Node and Chrome versions in the image, add --no-sandbox where required, set explicit process timeouts.
  3. Land it in CI first — a non-blocking job that reports scores without gating merges — to measure flake rate over two to four weeks.
  4. Promote to a blocking gate only once variance is characterized and thresholds are set with tolerance, not at the raw target.
  5. Optionally extend to scheduled production monitoring via a queued job, with results stored for trending.
  6. Concurrently, file the fork-or-replace decision: the moment a Laravel 11+ upgrade enters the roadmap, this package either gets an internal patch or is replaced by a ~50-line Process::run('npx lighthouse ...') wrapper.

Operational Impact

Maintenance. The package is archived, so ongoing maintenance is your responsibility by default. Realistically that means vendoring it, or accepting a pinned version that will fail to install after the next framework major. Budget a fork-and-patch contingency rather than assuming upstream will catch up. The underlying Lighthouse CLI also moves fast and changes score weights and audit categories between majors, so "the number went down" may reflect a tool upgrade rather than a regression — pin the Lighthouse version too.

Support. No vendor, no SLA, no security disclosure channel, five stars of community. Internal ownership must be named explicitly. Security-relevant exposure is indirect: the package shells out to Chrome, so your real attack surface is whatever URL you point it at, not the wrapper code itself — which argues for restricting it to first-party URLs and never to user-supplied ones.

Scaling. Each audit spawns a headless Chrome instance consuming hundreds of MB of RAM and many seconds of CPU. This does not scale horizontally with request volume and must never run inline in a web request. Scale by adding queue workers with concurrency limits and memory headroom, or by pushing audits to CI. Cost scales linearly with audit count and is dominated by compute, not by the package.

Failure modes. Expect: Chrome missing or wrong binary path; sandbox permission errors in containers; audit timeouts on slow or JS-heavy pages; memory exhaustion on constrained workers; score flakiness breaking CI gates; Laravel/PHP constraint conflicts after any framework upgrade; Node version drift breaking the CLI invocation; unreachable or auth-gated URLs producing errored reports that the parser may not handle gracefully. Design every integration point to fail open — a failed audit should warn, not block a deploy, until you trust the signal.

Ramp-up. Low for the PHP side: a Laravel developer can read the fluent API and Artisan command in an afternoon. The real ramp is on the platform side — Node/Chrome provisioning, container sandboxing, and interpreting Lighthouse variance. Assign that to whoever owns CI and container images, not to the feature team. Expect one to two days of environment work before the first reliable audit, and several weeks of data before thresholds are trustworthy enough to gate on.

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.
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib
tacticmedia/scim-server-bundle
neika-ai/symfony-bundle
mattleads/agent-publishing-bundle
glavweb/framework-bundle