90% host-webfonts-local

Code Review | OMGF | GDPR/DSGVO Compliant, Faster Google Fonts. Easy.

WordPress plugin OMGF | GDPR/DSGVO Compliant, Faster Google Fonts. Easy. scored90%from 54 tests.

About plugin

  • Plugin page: host-webfonts-local
  • Plugin version: 5.7.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.3
  • WordPress version: 6.3.1
  • First release: Jun 27, 2018
  • Latest release: Nov 8, 2023
  • Number of updates: 509
  • Update frequency: every 3.9 days
  • Top authors: DaanvandenBergh (100%)

Code review

54 tests

User reviews

196 reviews

Install metrics

200,000+ active /4,751,181 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.67MB] [CPU: ▲6.37ms] Passed 4 tests

This is a short check of server-side resources used by OMGF | GDPR/DSGVO Compliant, Faster Google Fonts. Easy.
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.92 ▲0.4645.26 ▲6.80
Dashboard /wp-admin4.05 ▲0.7452.18 ▲6.70
Posts /wp-admin/edit.php4.10 ▲0.7453.34 ▲8.44
Add New Post /wp-admin/post-new.php6.63 ▲0.74102.72 ▲3.52
Media Library /wp-admin/upload.php3.98 ▲0.7446.00 ▲13.59
Optimize Google Fonts /wp-admin/options-general.php?page=optimize-webfonts4.0239.05

Server storage [IO: ▲0.39MB] [DB: ▲0.00MB] Passed 3 tests

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 53 new files
Database: no new tables, 9 new options
New WordPress options
omgf_settings
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
omgf_cache_timestamp
can_compress_scripts
omgf_current_db_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for OMGF | GDPR/DSGVO Compliant, Faster Google Fonts. Easy.
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5714.70 ▼0.011.87 ▲0.1839.59 ▼3.17
Dashboard /wp-admin2,199 ▲215.58 ▼0.1389.94 ▼18.4943.61 ▲1.05
Posts /wp-admin/edit.php2,107 ▲102.02 ▲0.0140.69 ▲6.2835.64 ▲1.21
Add New Post /wp-admin/post-new.php1,529 ▲323.11 ▼0.45665.14 ▲43.9261.21 ▲6.67
Media Library /wp-admin/upload.php1,404 ▲44.19 ▲0.0297.95 ▼6.8344.40 ▲3.14
Optimize Google Fonts /wp-admin/options-general.php?page=optimize-webfonts1,2142.3225.4694.95

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • omgf_current_db_version
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • omgf_cache_timestamp
    • omgf_settings
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can take inspiration from this readme.txt

host-webfonts-local/host-webfonts-local.php Passed 13 tests

The main PHP file in "OMGF | GDPR/DSGVO Compliant, Faster Google Fonts. Easy." ver. 5.7.6 adds more information about the plugin and also serves as the entry point for this plugin
101 characters long description:
Increase GDPR/DSGVO compliance and leverage browser cache by automatically self-hosting Google Fonts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin5,067 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP389842,4534,004
LESS17426356
CSS2027333
JavaScript26293299
XML19345
JSON20030

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity18.88
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods229
▷ Static methods4318.78%
▷ Public methods17576.42%
▷ Protected methods00.00%
▷ Private methods5423.58%
Functions10
▷ Named functions00.00%
▷ Anonymous functions10100.00%
Constants58
▷ Global constants1017.24%
▷ Class constants4882.76%
▷ Public constants48100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/above-the-fold.png69.30KB29.20KB▼ 57.87%
assets/images/logo.png5.29KB2.98KB▼ 43.74%