83% reenable-shortlink-item-in-admin-toolbar

Code Review | Reenable Shortlink Item In Admin Toolbar

WordPress plugin Reenable Shortlink Item In Admin Toolbar scored83%from 54 tests.

About plugin

  • Plugin page: reenable-shortlin...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8.1
  • WordPress version: 6.3.1
  • First release: Dec 17, 2011
  • Latest release: Apr 8, 2014
  • Number of updates: 5
  • Update frequency: every 169.2 days
  • Top authors: klagraff (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

70+ active /3,088 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.12ms] Passed 4 tests

An overview of server-side resources used by Reenable Shortlink Item In Admin Toolbar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.47 ▼2.66
Dashboard /wp-admin3.31 ▲0.0050.65 ▲2.47
Posts /wp-admin/edit.php3.36 ▲0.0050.90 ▼4.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.05 ▼14.41
Media Library /wp-admin/upload.php3.24 ▲0.0035.74 ▲0.96

Server storage [IO: ▲0.00MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Please try to fix the following items
  • The plugin illegally modified 1 file (4.00KB) outside of "wp-content/plugins/reenable-shortlink-item-in-admin-toolbar/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Reenable Shortlink Item In Admin Toolbar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5713.24 ▼1.161.92 ▲0.1941.76 ▼0.11
Dashboard /wp-admin2,218 ▲155.77 ▼0.12100.83 ▲1.3941.55 ▼4.73
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0237.67 ▼9.8934.57 ▼4.27
Add New Post /wp-admin/post-new.php1,545 ▲1923.20 ▲5.72600.24 ▼92.9549.35 ▼6.03
Media Library /wp-admin/upload.php1,397 ▼04.34 ▲0.1296.37 ▼19.1241.54 ▼4.58

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

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

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
Please fix 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/reenable-shortlink-item-in-admin-toolbar/reenable_shortlink_display.php:14

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
The official readme.txt is a good inspiration

reenable-shortlink-item-in-admin-toolbar/reenable_shortlink_display.php 92% from 13 tests

This is the main PHP file of "Reenable Shortlink Item In Admin Toolbar" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("reenable-shortlink-item-in-admin-toolbar.php" instead of "reenable_shortlink_display.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin12 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151212

PHP code Passed 2 tests

This is a very shot review of 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.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin