83% go-top

Code Review | Go Top

WordPress plugin Go Top scored83%from 54 tests.

About plugin

  • Plugin page: go-top
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: May 21, 2015
  • Latest release: May 21, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: codycave (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,038 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Go Top
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.93 ▼2.85
Dashboard /wp-admin3.32 ▲0.0247.88 ▼2.25
Posts /wp-admin/edit.php3.38 ▲0.0250.07 ▼1.21
Add New Post /wp-admin/post-new.php5.91 ▲0.0284.53 ▼13.42
Media Library /wp-admin/upload.php3.25 ▲0.0237.43 ▲3.22

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Go Top
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲15313.50 ▼1.069.67 ▲7.7643.01 ▼0.80
Dashboard /wp-admin2,220 ▲435.66 ▲0.0686.23 ▼7.1446.79 ▲2.93
Posts /wp-admin/edit.php2,119 ▲192.02 ▲0.0737.75 ▲0.7436.23 ▼0.88
Add New Post /wp-admin/post-new.php1,550 ▲1423.09 ▲0.12596.94 ▼86.6751.84 ▼1.99
Media Library /wp-admin/upload.php1,425 ▲254.30 ▲0.1099.11 ▲0.1542.84 ▼2.68

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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 fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/go-top/admin/index.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/go-top/index.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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:
  • Contributors: Plugin contributors field is missing
Please take inspiration from this readme.txt

go-top/index.php 85% from 13 tests

The main PHP script in "Go Top" version 1.0.0 is automatically included on every request by WordPress
The following require your attention:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("go-top.php" instead of "index.php")

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
Everything looks great! No dangerous files found in this plugin692 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
SVG100565
PHP23840107
CSS24319
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected