Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Running Lighthouse audits
This section outlines the components included in the Lighthouse integration with Tide, demonstrates how the integration processes Lighthouse audits of WordPress.org themes, and provides examples of the Tide API with Lighthouse audit results.
Lighthouse auditing of WordPress themes has been integrated by running each theme from wp-themes.com through the Lighthouse CLI, stores the full report, and includes the summary results and a link to the full report in the Tide API. This currently functions locally, XWP is working to get this running on GCP.
The following outlines the components added to Tide in order to integrate Lighthouse in overall Tide auditing of WordPress themes.
- Docker Container
- Lighthouse CLI
- Lighthouse Server binary (lighthouse-server) Note: Uses an Alpine Image with working Chromium version. Produces consistent results with Lighthouse Chrome extension. Allows reduced image size of 432MB.
- Go Lighthouse Server Source Code
The following demonstrates how a WordPress theme is run through a Lighthouse audit and has its results stored and returned via the Tide API.
- Starts all Tide services and listens...
- authenticate with Tide API
- polls a job queue (SQS) for messages to process
- downloads theme and calculates checksum
- runs source through
goclocto get code information
- scans source for Theme header information (required for Lighthouse Report)
- runs theme through
https://wp-themes.com/<theme-slug>and keeps polling for next job.
- take full report and generate detailed report
- saves full report to a file store (S3)
- grabs subset of results
- category name
- bundles summary result and reference to full report as a message payload
- payload sent to Tide API instance
Lighthouse Results in Tide API
The following are example responses from the Tide API showing a summary of a Lighthouse report and a detailed result of a Lighthouse report.
Checksum Endpoint (Summary Only)
Checksum Endpoint (Details Included)
Note: Results for details is exactly the same as the output from a Lighthouse CI report.