83% supreme-google-webfonts

Code Review | Supreme Google Webfonts

WordPress plugin Supreme Google Webfonts scored83%from 54 tests.

About plugin

  • Plugin page: supreme-google-we...
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-4.1
  • WordPress version: 6.3.1
  • First release: Nov 11, 2011
  • Latest release: Mar 6, 2015
  • Number of updates: 18
  • Update frequency: every 67.3 days
  • Top authors: igmoweb (55.56%)josh401 (50%)

Code review

54 tests

User reviews

15 reviews

Install metrics

2,000+ active /43,823 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼8.67ms] Passed 4 tests

A check of server-side resources used by Supreme Google Webfonts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0737.59 ▼3.31
Dashboard /wp-admin3.37 ▲0.0344.26 ▼17.97
Posts /wp-admin/edit.php3.40 ▲0.0445.29 ▼5.54
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.53 ▼7.87
Media Library /wp-admin/upload.php3.30 ▲0.0736.97 ▲1.05

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
sgf_settings
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Supreme Google Webfonts: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.14 ▼0.121.52 ▼0.4236.49 ▼5.75
Dashboard /wp-admin2,189 ▲95.51 ▼0.1482.87 ▼10.0936.42 ▼0.27
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.1835.27 ▼4.1430.73 ▼1.46
Add New Post /wp-admin/post-new.php1,526 ▼223.60 ▲0.53613.18 ▲4.8058.98 ▼36.23
Media Library /wp-admin/upload.php1,403 ▲34.16 ▲0.0197.67 ▼7.0441.80 ▼4.43

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • sgf_settings
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 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 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
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/supreme-google-webfonts/main.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 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
8 plugin tags: visual editor, google web fonts, tinymce, admin, webfonts...

supreme-google-webfonts/main.php 69% from 13 tests

The main PHP script in "Supreme Google Webfonts" version 2.0.1 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("supreme-google-webfonts.php" instead of "main.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Domain Path: The domain path folder was not found ("/lang/")
  • Description: Please keep the plugin description shorter than 140 characters (currently 219 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected3,699 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP173263,699

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity25.00
▷ Minimum class complexity25.00
▷ Maximum class complexity25.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin