90% simple-fonts-loader

Code Review | Simple Fonts Loader

WordPress plugin Simple Fonts Loader scored90%from 54 tests.

About plugin

  • Plugin page: simple-fonts-loader
  • Plugin version: 1.7.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.2
  • WordPress version: 6.3.1
  • First release: Dec 13, 2021
  • Latest release: Nov 16, 2023
  • Number of updates: 35
  • Update frequency: every 20.4 days
  • Top authors: tombgtn (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,791 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▲5.81ms] Passed 4 tests

A check of server-side resources used by Simple Fonts Loader
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3243.17 ▲1.03
Dashboard /wp-admin3.69 ▲0.3955.37 ▲9.82
Posts /wp-admin/edit.php3.81 ▲0.4558.56 ▲11.85
Add New Post /wp-admin/post-new.php6.30 ▲0.4192.60 ▲3.43
Media Library /wp-admin/upload.php3.62 ▲0.3946.72 ▲8.94
Polices d'écritures /wp-admin/themes.php?page=simple-fonts-loader-settings3.7348.42

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 372 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Simple Fonts Loader
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1714.43 ▲0.161.52 ▼0.4036.67 ▼8.52
Dashboard /wp-admin2,205 ▲255.71 ▲0.0695.10 ▼2.3940.44 ▼2.00
Posts /wp-admin/edit.php2,116 ▲162.06 ▲0.1241.14 ▲6.8635.40 ▲2.15
Add New Post /wp-admin/post-new.php1,538 ▲1223.19 ▼0.11701.20 ▼16.1162.12 ▼4.99
Media Library /wp-admin/upload.php1,413 ▲134.27 ▲0.0398.27 ▼6.3041.95 ▼1.56
Polices d'écritures /wp-admin/themes.php?page=simple-fonts-loader-settings8,6401.9936.0466.49

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: simple, font-face, google, loader, font...

simple-fonts-loader/simple-fonts-loader.php Passed 13 tests

Analyzing the main PHP file in "Simple Fonts Loader" version 1.7.8
51 characters long description:
Just enable some fonts from Google Fonts on Website

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,073 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP5120116473
CSS1461275
JSON2600236
JavaScript215989

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.55
Average class complexity28.00
▷ Minimum class complexity13.00
▷ Maximum class complexity41.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods32
▷ Static methods1546.88%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin