62% gmo-go-to-top

Code Review | Plugin Name: GMO Go to Top

WordPress plugin Plugin Name: GMO Go to Top scored62%from 54 tests.

About plugin

  • Plugin page: gmo-go-to-top
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: May 16, 2014
  • Latest release: Jan 29, 2016
  • Number of updates: 30
  • Update frequency: every 36.5 days
  • Top authors: Takeaki Nagashima (96.67%)Otto42 (6.67%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /4,054 total downloads

Benchmarks

Plugin footprint 65% 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.95MB] [CPU: ▼42.45ms] Passed 4 tests

Analyzing server-side resources used by Plugin Name: GMO Go to Top
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0339.29 ▼2.22
Dashboard /wp-admin3.00 ▼0.3424.73 ▼43.22
Posts /wp-admin/edit.php3.00 ▼0.3524.15 ▼27.38
Add New Post /wp-admin/post-new.php3.00 ▼2.8924.75 ▼82.39
Media Library /wp-admin/upload.php3.00 ▼0.2322.69 ▼16.82
GMO Go To Top /wp-admin/options-general.php?page=go_to_top3.0023.06

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 36 new files
Database: no new tables, 13 new options
New WordPress options
gmogototop[iconsize]
gmogototop[marginbottom]
gmogototop[direction]
gmogototop[icon_fontstyle]
db_upgraded
theysaidso_admin_options
can_compress_scripts
gmogototop[img_color]
widget_recent-comments
gmogototop[type]
...

Browser metrics Passed 4 tests

An overview of browser requirements for Plugin Name: GMO Go to Top
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,911 ▲12513.71 ▼0.4913.51 ▲11.5044.92 ▲1.25
Dashboard /wp-admin2,202 ▲275.57 ▼0.0688.90 ▼23.2943.84 ▲1.18
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0033.30 ▼4.3636.19 ▲1.48
Add New Post /wp-admin/post-new.php1,529 ▲323.28 ▲0.20676.48 ▲20.1560.97 ▲1.93
Media Library /wp-admin/upload.php1,404 ▲14.19 ▼0.0095.59 ▼5.5643.46 ▼3.93
GMO Go To Top /wp-admin/options-general.php?page=go_to_top1,2573.0543.6971.01

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/gmo-go-to-top/gmo-go-to-top.php+113
    Use of undefined constant gmo_go_to_top - assumed 'gmo_go_to_top' (this will throw an Error in a future version of PHP)
  • Zombie WordPress options were found after uninstall: 13 options
    • gmogototop[marginlr]
    • widget_recent-comments
    • can_compress_scripts
    • gmogototop[img_color]
    • gmogototop[icon_fontstyle]
    • gmogototop[iconsize]
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • gmogototop[type]
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=go_to_top
    • > Warning in wp-content/plugins/gmo-go-to-top/gmo-go-to-top.php+113
    Use of undefined constant gmo_go_to_top - assumed 'gmo_go_to_top' (this will throw an Error in a future version of PHP)

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gmo-go-to-top/gmo-go-to-top.php:28

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=go_to_top
    • > Network (severe)
    wp-content/plugins/gmo-go-to-top/images/bnr_themes.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=go_to_top
    • > Network (severe)
    wp-content/plugins/gmo-go-to-top/images/bnr_plugins.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=go_to_top
    • > Network (severe)
    wp-content/plugins/gmo-go-to-top/images/logo.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=go_to_top
    • > Network (severe)
    wp-content/plugins/gmo-go-to-top/css/gmo-admin-plugin.css?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=go_to_top
    • > Javascript (severe) in unknown
    /wp-content/plugins/gmo-go-to-top/colorpic.js?ver=6.3.1 1:20 Uncaught TypeError: $(...).farbtastic is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === Plugin Name: GMO Go to Top === )
The official readme.txt might help

gmo-go-to-top/gmo-go-to-top.php Passed 13 tests

The entry point to "Plugin Name: GMO Go to Top" version 1.4 is a PHP file that has certain tags in its header comment area
127 characters long description:
GMO Go to Top is simple plugin and it will add a simple button which allows users to easily scroll back to the top of the page.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,239 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
SVG309620
CSS52025273
PHP1198224
JavaScript381097
XML20013
HTML14012

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ 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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
9 PNG files occupy 0.25MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wpcloud_logo.png4.90KB2.99KB▼ 39.04%
screenshot-1.png195.93KB55.73KB▼ 71.56%
images/wpshop_bnr_themes.png13.39KB5.79KB▼ 56.74%
images/wpcloud_bnr_themes.png8.66KB3.83KB▼ 55.75%
images/wpshop_bnr_plugins.png13.29KB5.68KB▼ 57.23%