GTmetrix plugin for Craft CMS 3.x
GTmetrix gives you insight on how well your entries load and provides actionable recommendations on how to optimise them.
This plugin requires Craft CMS 3.0.0 or later.
To install the plugin, follow these instructions.
Open your terminal and go to your Craft project:
Then tell Composer to load the plugin:
composer require lukeyouell/craft-gtmetrix
In the Control Panel, go to Settings → Plugins and click the “Install” button for GTmetrix.
Upon successful installation you will be required to supply valid credentials to successfully communicate with the GTmetrix API.
A GTmetrix account is required, if you don't already have one click here to create one.
Free & paid plans are available.
Once you have provided valid credentials you will be able to make GTmetrix test requests.
Making a Request
- Click the "New test" button
- Select an entry, location, browser and connection type
- Set additional conditions such as HTTP authentication, cookies, AdBlock and resource whitelisting/blacklisting
- Submit the request
Once a test has been successfully submitted, there are five possible states:
The request is waiting for a response.
The request has been accepted and placed in a queue.
Testing has been initiated.
There was a problem with the test, a description of the error will be provided.
The test has been completed and is now available for you to view.
Some things to do, and ideas for potential features:
- Ability to re-test entry
- Restrict abilities if API credentials are missing
- Delete records
- Make test resources available
Brought to you by Luke Youell