84% ultimate-fonts

Code Review | Ultimate Fonts

WordPress plugin Ultimate Fonts scored 84% from 54 tests.

About plugin

  • Plugin page: ultimate-fonts
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.2.3
  • WordPress version: 6.3.1
  • First release: Sep 16, 2016
  • Latest release: Sep 14, 2019
  • Number of updates: 17
  • Update frequency: every 64.3 days
  • Top authors: gretathemes (88.24%)rilwis (17.65%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active / 12,366 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.20MB] [CPU: ▼2.33ms] Passed 4 tests

Server-side resources used by Ultimate Fonts
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.32 ▲0.8638.83 ▼0.89
Dashboard /wp-admin3.74 ▲0.4452.38 ▲1.58
Posts /wp-admin/edit.php3.51 ▲0.1648.01 ▼1.81
Add New Post /wp-admin/post-new.php5.98 ▲0.0993.69 ▼8.18
Media Library /wp-admin/upload.php3.32 ▲0.0937.43 ▲5.03
Ultimate Fonts /wp-admin/options-general.php?page=ultimate-fonts3.2931.87

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
ultimate-fonts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Ultimate Fonts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,909 ▲16314.40 ▼0.342.09 ▲0.3942.93 ▲2.92
Dashboard /wp-admin2,285 ▲944.84 ▼0.09112.87 ▲4.8141.60 ▲3.05
Posts /wp-admin/edit.php2,096 ▲282.00 ▼0.0236.41 ▲0.9331.84 ▼4.83
Add New Post /wp-admin/post-new.php1,536 ▲323.15 ▲0.14614.96 ▼14.5368.12 ▲20.85
Media Library /wp-admin/upload.php1,392 ▲44.21 ▲0.00100.49 ▼6.4244.20 ▲2.88
Ultimate Fonts /wp-admin/options-general.php?page=ultimate-fonts9551.8829.3430.76

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • ultimate-fonts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 50% from 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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/ultimate-fonts/inc/class-ultimate-fonts-font-family-control.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/ultimate-fonts/inc/config.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: These screenshots lack descriptions #2, #3 in ultimate-fonts/assets to your readme.txt
The official readme.txt might help

ultimate-fonts/ultimate-fonts.php Passed 13 tests

The main PHP file in "Ultimate Fonts" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
40 characters long description:
Easily add Google Fonts to your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,423 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP10803001,305
JavaScript2222166
CSS23052

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity7.25
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods33
▷ Static methods39.09%
▷ Public methods2369.70%
▷ Protected methods1030.30%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin