PHPackages                             edmondscommerce/lighthouse - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. edmondscommerce/lighthouse

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

edmondscommerce/lighthouse
==========================

Interface for the Google Lighthouse project

0141PHP

Since Jun 21Pushed 6y agoCompare

[ Source](https://github.com/edmondscommerce/lighthouse-php)[ Packagist](https://packagist.org/packages/edmondscommerce/lighthouse)[ RSS](/packages/edmondscommerce-lighthouse/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Lighthouse
==========

[](#lighthouse)

This package provide a php interface for [Google Lighthouse](https://github.com/GoogleChrome/lighthouse).

Here's an example that will perform the default Lighthouse audits and store the result in `report.json` (You can use the [Lighthouse Viewer](https://googlechrome.github.io/lighthouse/viewer/) to open the report):

```
use Dzava\Lighthouse\Lighthouse;

(new Lighthouse())
    ->setOutput('report.json')
    ->accessibility()
    ->bestPractices()
    ->performance()
    ->pwa()
    ->seo()
    ->audit('http://example.com');
```

### Output

[](#output)

The `setOutput` method accepts a second argument that can be used to specify the format (json,html). If the format argument is missing then the file extension will be used to determine the output format. If the file extension does not specify an accepted format, then json will be used.

You can output both the json and html reports by passing an array as the second argument. For the example the following code will create two reports `example.report.html` and `example.report.json`.

```
use Dzava\Lighthouse\Lighthouse;

(new Lighthouse())
    ->setOutput('example', ['html', 'json'])
    ->performance()
    ->audit('http://example.com');
```

### Using a custom config

[](#using-a-custom-config)

You can provide your own configuration file using the `withConfig` method.

```
use Dzava\Lighthouse\Lighthouse;

(new Lighthouse())
    ->withConfig('./my-config.js')
    ->audit('http://example.com');
```

### Customizing node and Lighthouse paths

[](#customizing-node-and-lighthouse-paths)

If you need to manually set these paths, you can do this by calling the `setNodeBinary` and `setLighthousePath` methods.

```
use Dzava\Lighthouse\Lighthouse;

(new Lighthouse())
    ->setNodeBinary('/usr/bin/node')
    ->setLighthousePath('./lighthouse.js')
    ->audit('http://example.com');
```

### Passing flags to Chrome

[](#passing-flags-to-chrome)

Use the `setChromeFlags` method to pass any flags to the Chrome instance.

```
use Dzava\Lighthouse\Lighthouse;

(new Lighthouse())
    // these are the default flags used
    ->setChromeFlags(['--headless', '--disable-gpu', '--no-sandbox'])
    ->audit('http://example.com');
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 63.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7af407ceeb8622c9c164d386ef3e95cda4c94d141240348ac5703223bb499d0e?d=identicon)[edmondscommerce](/maintainers/edmondscommerce)

---

Top Contributors

[![dzava](https://avatars.githubusercontent.com/u/1516475?v=4)](https://github.com/dzava "dzava (12 commits)")[![edmondscommerce](https://avatars.githubusercontent.com/u/62842?v=4)](https://github.com/edmondscommerce "edmondscommerce (7 commits)")

### Embed Badge

![Health badge](/badges/edmondscommerce-lighthouse/health.svg)

```
[![Health](https://phpackages.com/badges/edmondscommerce-lighthouse/health.svg)](https://phpackages.com/packages/edmondscommerce-lighthouse)
```

###  Alternatives

[b13/assetcollector

Add CSS and SVG files and strings as inline style tag/inline svg to the html code.

10118.4k](/packages/b13-assetcollector)[miranj/craft-router

Use URL segments as filtering criteria on an entry query.

231.6k](/packages/miranj-craft-router)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
