Download the PHP package anubit/typo3-lighthouse-insight without Composer

On this page you can find all versions of the php package anubit/typo3-lighthouse-insight. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package typo3-lighthouse-insight

Lighthouse Insight

TYPO3 backend module that runs Google PageSpeed Insights (or a local Lighthouse CLI) analyses against TYPO3 pages and shows the results — scores, lab/field metrics, and opportunity/diagnostic findings — directly in the backend, color-coded to Lighthouse's own good/average/poor thresholds. The URL to analyze is either resolved automatically from the selected page or overridden manually via a TYPO3 link field (page or external URL). The backend UI is available in English and German.

Requirements

Installation

Add the package to a Composer TYPO3 project:

For local path development inside this repository, require it as:

Then activate the extension if your installation does not auto-activate Composer extensions:

The backend module appears under Content > PageSpeed for backend users with access to that module.

Configuration

All settings are in the extension configuration (Admin Tools > Settings > Extension Configuration > lighthouse_insight), or directly in config/system/settings.php / AdditionalConfiguration.php:

Key Tab Type Description
apiKey Basic string Google PageSpeed Insights API key. Required for the Google PageSpeed API engine.
localChromeFlags local string Chrome flags used by the local Lighthouse CLI run. Defaults to --headless --ignore-certificate-errors --no-sandbox.
localLighthousePackage local string npm package/version run via npx. Defaults to [email protected].
localTimeout local int Timeout in seconds for the local Lighthouse process. Defaults to 120.

Set the API key via extension configuration (never commit a real key to a versioned config file):

For local Lighthouse analysis, the PHP runtime must be able to execute:

In DDEV this means Node, npm, and Chrome/Chromium must be available in the web container, not only on the host machine. This repository includes a DDEV web image addition that installs Chromium after ddev restart.

The backend module checks these local requirements and shows a warning with setup tasks when Local Lighthouse is unavailable.

No configuration is needed for the German backend labels — TYPO3 picks de.locallang.xlf automatically for backend users whose interface language is set to German.

Obtaining an API Key

  1. Open Google Cloud Console.
  2. Create or choose a project.
  3. Enable the PageSpeed Insights API.
  4. Create an API key.
  5. Restrict the key according to your deployment policy.
  6. Store it in the TYPO3 environment/system configuration.

Backend Usage

  1. Open the TYPO3 backend.
  2. Select a page in the page tree.
  3. Open Content > PageSpeed.
  4. Review the resolved frontend URL, or override it: type a URL directly, or click the link icon to pick a page or external URL via TYPO3's native link browser. Leave it empty to keep using the page's own resolved URL.
  5. Choose the engine (Google PageSpeed API or Local Lighthouse) and strategy (Mobile or Desktop).
  6. Click Run analysis.

The module sends the resolved (or manually overridden) URL to the selected engine and renders the Lighthouse scores, lab data, field data, and findings in TYPO3. Scores and field-data badges are color-coded to Lighthouse's own thresholds: green (≥90 / FAST), orange (50–89 / AVERAGE), red (<50 / SLOW).

Local DDEV URLs such as *.ddev.site cannot be analyzed by Google PageSpeed Insights because Google must be able to reach the URL from outside your machine. Use a public staging URL or expose the local site through a temporary tunnel when testing development instances.

Alternatively choose the Local Lighthouse engine. It runs Lighthouse locally via npx --yes [email protected] and can analyze DDEV URLs, provided the TYPO3 PHP environment has Node and Chrome/Chromium available.

Architecture

No raw Lighthouse JSON is passed to Fluid.

Security

The Google API engine does not run Chrome or Lighthouse on the TYPO3 server. The local engine does, and should be enabled only in trusted development environments.

Field Data vs Lab Data

Lighthouse lab metrics are shown separately from Chrome UX Report field data.

INP is shown only when Google provides field data. TBT is kept as a Lighthouse lab metric and is not presented as INP.

Local Lighthouse reports lab data only. Chrome UX Report field data is only available through Google PageSpeed Insights.

Development

Run PHP syntax checks from the project root:

Run unit tests from the extension directory after installing dev dependencies:


All versions of typo3-lighthouse-insight with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
symfony/process Version ^7.4
typo3/cms-backend Version ^14.3
typo3/cms-core Version ^14.3
typo3/cms-fluid Version ^14.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package anubit/typo3-lighthouse-insight contains the following files

Loading the files please wait ...