90% easyfonts

Code Review | Local google fonts, host google fonts locally by Easyfonts

WordPress plugin Local google fonts, host google fonts locally by Easyfonts scored90%from 54 tests.

About plugin

  • Plugin page: easyfonts
  • Plugin version: 1.1.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 25, 2023
  • Latest release: Sep 12, 2023
  • Number of updates: 20
  • Update frequency: every 11.8 days
  • Top authors: easywpstuff (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /1,665 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
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼9.58ms] Passed 4 tests

Analyzing server-side resources used by Local google fonts, host google fonts locally by Easyfonts
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0340.07 ▲2.28
Dashboard /wp-admin3.31 ▼0.0342.70 ▼15.12
Posts /wp-admin/edit.php3.43 ▲0.0748.66 ▼0.57
Add New Post /wp-admin/post-new.php5.90 ▲0.0177.66 ▼18.32
Media Library /wp-admin/upload.php3.24 ▲0.0131.23 ▼4.31
Easy Fonts /wp-admin/options-general.php?page=easyfonts3.2031.13

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Local google fonts, host google fonts locally by Easyfonts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.021.67 ▲0.0044.00 ▼0.18
Dashboard /wp-admin2,199 ▲195.62 ▼0.0488.35 ▲1.9935.80 ▼3.26
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0139.53 ▲3.5935.84 ▲2.82
Add New Post /wp-admin/post-new.php1,540 ▲1218.33 ▼4.76640.66 ▼7.1965.24 ▲12.84
Media Library /wp-admin/upload.php1,404 ▲44.14 ▼0.0191.87 ▼27.8541.49 ▼9.83
Easy Fonts /wp-admin/options-general.php?page=easyfonts9591.9623.6759.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt might help

easyfonts/easyfonts.php Passed 13 tests

The main file in "Local google fonts, host google fonts locally by Easyfonts" v. 1.1.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
63 characters long description:
Automatically Host existing google fonts locally on your server

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin2,368 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP44373832,212
CSS1130156

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity194.50
▷ Minimum class complexity139.00
▷ Maximum class complexity250.00
Average method complexity5.30
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods90
▷ Static methods11.11%
▷ Public methods7583.33%
▷ Protected methods1516.67%
▷ Private methods00.00%
Functions28
▷ Named functions2485.71%
▷ Anonymous functions414.29%
Constants26
▷ Global constants26100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin