-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closes #40: 3.19 Preload fonts beacon processing part #42
base: feature/3.19-beacons
Are you sure you want to change the base?
Closes #40: 3.19 Preload fonts beacon processing part #42
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
Some codacy issues to fix but can be reviewed now. |
Description
Closes wp-media/wp-rocket#7241
Closes wp-media/wp-rocket#7270
Adds new script to the beacon to extract fonts used above the fold.
Type of change
Detailed scenario
N/A
Technical description
Documentation
The BeaconPreloadFonts class analyzes font usage on a webpage, focusing on fonts visible above the fold. It detects network-loaded and stylesheet fonts, checks for system fonts, and verifies element visibility. The class cleans URLs, extracts @font-face rules, and summarizes font usage data, including counts of elements using each font. It logs results and handles errors during processing. Overall, it helps optimize font loading for better user experience.
New dependencies
N/A
Risks
List possible performance & security issues or risks, and explain how they have been mitigated.
See here
Mandatory Checklist
Code validation
Code style
Unticked items justification
N/A
Additional Checks