PHPackages                             grezlikowski/page-speed - 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. grezlikowski/page-speed

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

grezlikowski/page-speed
=======================

PageSpeed with History is a PHP package that provides a convenient way to track and analyze the performance of web pages over time. It allows developers to monitor page speed metrics, identify performance bottlenecks, and optimize their websites for better user experience.

1.1.0(4mo ago)09↓83.3%[2 PRs](https://github.com/grezlikowski/page-speed/pulls)MITPHPPHP ^8.3CI passing

Since Mar 16Pushed 3mo agoCompare

[ Source](https://github.com/grezlikowski/page-speed)[ Packagist](https://packagist.org/packages/grezlikowski/page-speed)[ Docs](https://github.com/grezlikowski/page-speed)[ GitHub Sponsors](https://github.com/grezlikowski)[ RSS](/packages/grezlikowski-page-speed/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (8)Versions (7)Used By (0)

PageSpeed with History
======================

[](#pagespeed-with-history)

[![Latest Version on Packagist](https://camo.githubusercontent.com/c9c11f3a0e7c84da84a44f4949d7e4de114038fe50add4044a34e491f91a5f3c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6772657a6c696b6f77736b692f706167652d73706565642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/grezlikowski/page-speed)[![Tests](https://camo.githubusercontent.com/025e891cf4c78b2b9bd5d2df8ac2778efe011b997cdb34ae36e459ac352a2aeb/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6772657a6c696b6f77736b692f706167652d73706565642f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/grezlikowski/page-speed/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/2a5ffa27fcc028c7a8bd0adc3e9b0fd1d5da3609a35f9a15a1bf9e1b8cfa941c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6772657a6c696b6f77736b692f706167652d73706565642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/grezlikowski/page-speed)

PageSpeed with History is a PHP package that provides a convenient way to track and analyze the performance of web pages over time. It allows developers to monitor page speed metrics, identify performance bottlenecks, and optimize their websites for better user experience.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require grezlikowski/page-speed
```

Run migrations:

```
php artisan migrate
```

Add your Google PageSpeed Insights API key to `.env`:

```
GOOGLE_PAGESPEED_API_KEY=your-api-key-here
```

### Publishing

[](#publishing)

Migrations run automatically without publishing. Config works out of the box thanks to `mergeConfigFrom`. You can optionally publish assets to customize them:

**Config:**

```
php artisan vendor:publish --tag="page-speed-config"
```

**Views:**

```
php artisan vendor:publish --tag="page-speed-views"
```

Usage
-----

[](#usage)

Visit `/page-speed` in your browser. By default, the panel is accessible to everyone.

### Authorization

[](#authorization)

You can restrict access to the panel using a Laravel Gate. Define a `viewPageSpeed` gate in your `AppServiceProvider`:

```
use Illuminate\Support\Facades\Gate;

public function boot(): void
{
    Gate::define('viewPageSpeed', function ($user) {
        return $user->is_admin;
    });
}
```

If the `viewPageSpeed` gate is not defined, the panel is open to all users.

You can also change the gate name in the config:

```
// config/page-speed.php
'gate' => 'myCustomGate',
```

Alternatively, use a custom callback via `PageSpeedPanel::auth()` in your `AppServiceProvider`:

```
use Grezlikowski\PageSpeed\PageSpeedPanel;

public function boot(): void
{
    PageSpeedPanel::auth(function ($request) {
        return $request->user()?->hasRole('administrator');
    });
}
```

When a custom callback is registered via `PageSpeedPanel::auth()`, it takes priority over the gate.

### Configuration

[](#configuration)

You can customize the panel path, middleware, and other settings in `config/page-speed.php`:

```
return [
    'api_key' => env('GOOGLE_PAGESPEED_API_KEY', ''),
    'path' => env('PAGESPEED_PATH', 'page-speed'),
    'middleware' => ['web'],
    'default_strategy' => 'mobile',
    'history_limit' => 50,
    'timeout' => 60,
    'gate' => 'viewPageSpeed',
    'enabled' => env('PAGESPEED_ENABLED', true),
];
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Łukasz Gręźlikowski](https://github.com/grezlikowski)
- [All Contributors](../../contributors)

This package was created using the [Spatie Package Skeleton](https://github.com/spatie/package-skeleton-php).

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance77

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

146d ago

PHP version history (2 changes)1.0.0PHP ^8.2

1.1.0PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/38f429e7d2a9c1ff345ac2a00c2b7118288e9f7ca2808c019d7d0654250cbe41?d=identicon)[grezlikowski](/maintainers/grezlikowski)

---

Top Contributors

[![grezlikowski](https://avatars.githubusercontent.com/u/4232647?v=4)](https://github.com/grezlikowski "grezlikowski (20 commits)")

---

Tags

page-speedgrezlikowski

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/grezlikowski-page-speed/health.svg)

```
[![Health](https://phpackages.com/badges/grezlikowski-page-speed/health.svg)](https://phpackages.com/packages/grezlikowski-page-speed)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k31.8M158](/packages/laravel-cashier)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

79227.1M210](/packages/laravel-mcp)[api-platform/laravel

API Platform support for Laravel

58190.1k21](/packages/api-platform-laravel)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)[moonshine/moonshine

Laravel administration panel

1.3k268.2k88](/packages/moonshine-moonshine)

PHPackages © 2026

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