83% gmo-font-agent

Code Review | Plugin Name: GMO Font Agent

WordPress plugin Plugin Name: GMO Font Agentscored83%from 54 tests.

About plugin

  • Plugin page: gmo-font-agent
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.4
  • WordPress version: 6.3.1
  • First release: Apr 14, 2014
  • Latest release: Jan 29, 2016
  • Number of updates: 46
  • Update frequency: every 24.5 days
  • Top authors: Takeaki Nagashima (100%)

Code review

54 tests

User reviews

1 review

Install metrics

600+ active /22,561 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.78ms] Passed 4 tests

Server-side resources used by Plugin Name: GMO Font Agent
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.03 ▼4.50
Dashboard /wp-admin3.33 ▲0.0245.03 ▼11.27
Posts /wp-admin/edit.php3.38 ▲0.0247.83 ▲1.23
Add New Post /wp-admin/post-new.php5.93 ▲0.0487.98 ▲3.42
Media Library /wp-admin/upload.php3.25 ▲0.0235.37 ▲4.22
GMO Font Agent /wp-admin/options-general.php?page=gmofontagent3.2731.40

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 73 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Plugin Name: GMO Font Agent: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲8213.13 ▼1.621.75 ▼0.2641.32 ▼6.08
Dashboard /wp-admin2,219 ▲314.91 ▲0.02107.67 ▼8.3042.02 ▼3.94
Posts /wp-admin/edit.php2,105 ▲192.02 ▲0.0239.81 ▲1.8535.16 ▲2.03
Add New Post /wp-admin/post-new.php1,549 ▲1618.36 ▼4.66610.31 ▼12.7744.71 ▼10.09
Media Library /wp-admin/upload.php1,404 ▲194.21 ▲0.0195.76 ▼19.0242.19 ▼5.48
GMO Font Agent /wp-admin/options-general.php?page=gmofontagent1,7502.4143.0669.37

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      Use of undefined constant GMOFONTAGENT_URL - assumed 'GMOFONTAGENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gmo-font-agent/tinymce/3.5.9/tinymce-iconfonts-popup.html.php on line 6
    • > PHP Warning
      Use of undefined constant GMOFONTAGENT_URL - assumed 'GMOFONTAGENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gmo-font-agent/tinymce/4.0.20/tinymce-iconfonts-popup.html.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/gmo-font-agent/gmo-font-agent.php:33
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/gmo-font-agent/tinymce/4.0.20/tinymce-iconfonts-popup.html.php:8
    • > PHP Warning
      Use of undefined constant GMOFONTAGENT_URL - assumed 'GMOFONTAGENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gmo-font-agent/tinymce/3.5.9/tinymce-iconfonts-popup.html.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/gmo-font-agent/includes/admin.php:1
    • > PHP Warning
      Use of undefined constant GMOFONTAGENT_URL - assumed 'GMOFONTAGENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gmo-font-agent/tinymce/4.0.20/tinymce-iconfonts-popup.html.php on line 6
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/gmo-font-agent/tinymce/3.5.9/tinymce-iconfonts-popup.html.php:8
    • > PHP Warning
      Use of undefined constant GMOFONTAGENT_URL - assumed 'GMOFONTAGENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gmo-font-agent/tinymce/4.0.20/tinymce-iconfonts-popup.html.php on line 4
    • > PHP Warning
      Use of undefined constant GMOFONTAGENT_URL - assumed 'GMOFONTAGENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/gmo-font-agent/tinymce/3.5.9/tinymce-iconfonts-popup.html.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Plugin Name: GMO Font Agent=== )
The official readme.txt is a good inspiration

gmo-font-agent/gmo-font-agent.php 85% from 13 tests

"Plugin Name: GMO Font Agent" version 1.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 220 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected20,538 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
JSON20010,737
HTML1225,898
CSS739211,743
PHP696341,096
SVG200596
JavaScript63429255
Sass2120111
XML140091
Ruby16129
Markdown1102

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity23.50
▷ Minimum class complexity5.00
▷ Maximum class complexity42.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods1986.36%
▷ Protected methods00.00%
▷ Private methods313.64%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.60MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ico_link.png1.00KB0.21KB▼ 79.07%
images/wpshop_bnr_themes.png13.39KB5.79KB▼ 56.74%
images/wpcloud_logo.png4.90KB2.99KB▼ 39.04%
images/wpshop_logo.png7.22KB5.91KB▼ 18.12%
images/bnr_plugins.png3.48KB2.30KB▼ 33.86%