PHPackages                             marshmallow/gtmetrix - 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. marshmallow/gtmetrix

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

marshmallow/gtmetrix
====================

Get GT Metrix information in Laravel Nova for you website pages. This package can also be used stand-alone.

v1.1.2(5y ago)06.0k[1 PRs](https://github.com/marshmallow-packages/gtmetrix/pulls)MITPHPPHP ^7.4|^8.0

Since Aug 19Pushed 2y ago1 watchersCompare

[ Source](https://github.com/marshmallow-packages/gtmetrix)[ Packagist](https://packagist.org/packages/marshmallow/gtmetrix)[ Docs](https://github.com/Marshmallow-Development/)[ RSS](/packages/marshmallow-gtmetrix/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (14)Used By (0)

[![alt text](https://camo.githubusercontent.com/329958cb02b7bee461fd9dcae7a0a3a34e6595669116ff441ad5ef9e77bc511c/68747470733a2f2f63646e2e6d617273686d616c6c6f772d6f66666963652e636f6d2f6d656469612f696d616765732f6c6f676f2f6d617273686d616c6c6f772e7472616e73706172656e742e7265642e706e67 "marshmallow.")](https://camo.githubusercontent.com/329958cb02b7bee461fd9dcae7a0a3a34e6595669116ff441ad5ef9e77bc511c/68747470733a2f2f63646e2e6d617273686d616c6c6f772d6f66666963652e636f6d2f6d656469612f696d616765732f6c6f676f2f6d617273686d616c6c6f772e7472616e73706172656e742e7265642e706e67)

GT Metrix for Laravel Nova
==========================

[](#gt-metrix-for-laravel-nova)

Get GT Metrix information in Laravel Nova for you website pages. This package can also be used stand-alone.

How does it work?
=================

[](#how-does-it-work)

You create an account on GT Metrix. Once you have an API key you are good to go. You can add this library on every resource you want to, as long as it has a public url connected to it so we can get the GT Metrix score for that url.

Index view
----------

[](#index-view)

On the index page we show an avarage score of the `Pagespeed` score and the `Yslow` score.

[![](https://camo.githubusercontent.com/b5f60005e91694eaddac743dad8d508be9c112eef1606d8db928a89f39065ed0/68747470733a2f2f6769746c61622e636f6d2f6d617273686d616c6c6f772d7061636b616765732f6e6f76612f67746d65747269782f2d2f7261772f6d61737465722f7265736f75726365732f73637265656e73686f74732f696e6465782d766965772e706e67)](https://camo.githubusercontent.com/b5f60005e91694eaddac743dad8d508be9c112eef1606d8db928a89f39065ed0/68747470733a2f2f6769746c61622e636f6d2f6d617273686d616c6c6f772d7061636b616765732f6e6f76612f67746d65747269782f2d2f7261772f6d61737465722f7265736f75726365732f73637265656e73686f74732f696e6465782d766965772e706e67)

Detail view
-----------

[](#detail-view)

On the detail view we will show the `Pagespeed` score and the `Yslow` score. You can click on them to go to the full report on the GTmetrix.com website.

[![](https://camo.githubusercontent.com/bb702aa4976f60551320d8d43c3831a89906f9c0ed0ef4725c61e44b797d9b0e/68747470733a2f2f6769746c61622e636f6d2f6d617273686d616c6c6f772d7061636b616765732f6e6f76612f67746d65747269782f2d2f7261772f6d61737465722f7265736f75726365732f73637265656e73686f74732f64657461696c2d766965772e706e67)](https://camo.githubusercontent.com/bb702aa4976f60551320d8d43c3831a89906f9c0ed0ef4725c61e44b797d9b0e/68747470733a2f2f6769746c61622e636f6d2f6d617273686d616c6c6f772d7061636b616765732f6e6f76612f67746d65747269782f2d2f7261772f6d61737465722f7265736f75726365732f73637265656e73686f74732f64657461696c2d766965772e706e67)

Action
------

[](#action)

On the detail view you will be able to start an action. This action is queued so make sure you have a worker running. This is needed because the changes of a timeout are big if its busy at GTmetrix.

[![](https://camo.githubusercontent.com/a12ad772de857a3d898495d41fd393de97e3f1cb4b84dbb050667e41532303d1/68747470733a2f2f6769746c61622e636f6d2f6d617273686d616c6c6f772d7061636b616765732f6e6f76612f67746d65747269782f2d2f7261772f6d61737465722f7265736f75726365732f73637265656e73686f74732f616374696f6e2d766965772e706e67)](https://camo.githubusercontent.com/a12ad772de857a3d898495d41fd393de97e3f1cb4b84dbb050667e41532303d1/68747470733a2f2f6769746c61622e636f6d2f6d617273686d616c6c6f772d7061636b616765732f6e6f76612f67746d65747269782f2d2f7261772f6d61737465722f7265736f75726365732f73637265656e73686f74732f616374696f6e2d766965772e706e67)

Once you've selected the action to get a new score you will get a popup telling you how much credits you have left and if you are sure you want to spend another credit.

[![](https://camo.githubusercontent.com/401a79bb3663d823956613fdfd545cd871dc25c0dc5b69b30d4d9f8e8398fc8c/68747470733a2f2f6769746c61622e636f6d2f6d617273686d616c6c6f772d7061636b616765732f6e6f76612f67746d65747269782f2d2f7261772f6d61737465722f7265736f75726365732f73637265656e73686f74732f616374696f6e2d706f7075702e706e67)](https://camo.githubusercontent.com/401a79bb3663d823956613fdfd545cd871dc25c0dc5b69b30d4d9f8e8398fc8c/68747470733a2f2f6769746c61622e636f6d2f6d617273686d616c6c6f772d7061636b616765732f6e6f76612f67746d65747269782f2d2f7261772f6d61737465722f7265736f75726365732f73637265656e73686f74732f616374696f6e2d706f7075702e706e67)

### Installation

[](#installation)

Pull in the library using composer.

```
composer require marshmallow/gtmetrix
```

Update your `.env` file and add the to env properties listed below.

```
GTMETRIX_EMAIL_ADDRESS=...
GTMETRIX_API_KEY=...
```

### Prepare your models

[](#prepare-your-models)

1. Add `use Actionable;` and `use GTMetrix;` to your model.

```
namespace App;

use Laravel\Nova\Actions\Actionable;
use Marshmallow\GTMetrix\Traits\GTMetrix;

class Post extends Model
{
    use GTMetrix;
    use Actionable;
    // ...
```

2. Add the public method `getFullPublicPath()` to your models. When getting the status from GT Metrix, we will use the result of this method as the url you want to check.

```
class Post extends Model
{
    // ...

    public function getFullPublicPath()
    {
        return 'https://marshmallow.dev/' . $this->slug;
    }
}
```

### Prepare your nova resources

[](#prepare-your-nova-resources)

1. Add `GTMetrixField::make('GT Metrix'),` as a field.

```
use Marshmallow\GTMetrix\GTMetrixField;

public function fields(Request $request)
{
    return [
        ID::make(__('ID'), 'id')->sortable(),
        GTMetrixField::make('GT Metrix'),
    ];
}
```

2. Add `new CheckGTMetrixScore,` as an action.

```
use Marshmallow\GTMetrix\Actions\CheckGTMetrixScore;

public function actions(Request $request)
{
    return [
        new CheckGTMetrixScore,
    ];
}
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

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

###  Release Activity

Cadence

Every ~29 days

Recently: every ~57 days

Total

9

Last Release

1912d ago

PHP version history (2 changes)v1.0.0PHP ^7.4

v1.1.1PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/be33d2624e24c516e73892b0929447cc762f3622c024ab8d0d2a59042e5d2c7f?d=identicon)[marshmallow](/maintainers/marshmallow)

---

Top Contributors

[![stefvanesch](https://avatars.githubusercontent.com/u/46725619?v=4)](https://github.com/stefvanesch "stefvanesch (20 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

laravellaravel-novamarshmallownova-packagegtmetrixlaravel nova gtmetrix

### Embed Badge

![Health badge](/badges/marshmallow-gtmetrix/health.svg)

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

PHPackages © 2026

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