84% linkrocker

Code Review | Menu Rocker

WordPress plugin Menu Rocker scored84%from 54 tests.

About plugin

  • Plugin page: linkrocker
  • Plugin version: 3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.6
  • WordPress version: 6.3.1
  • First release: Nov 27, 2013
  • Latest release: Nov 27, 2013
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: tsl143 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,073 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.00MB] [CPU: ▲4.64ms] Passed 4 tests

Server-side resources used by Menu Rocker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.17 ▲0.51
Dashboard /wp-admin3.31 ▲0.0044.86 ▲1.04
Posts /wp-admin/edit.php3.36 ▲0.0052.53 ▲7.49
Add New Post /wp-admin/post-new.php5.89 ▲0.0197.76 ▲9.50
Media Library /wp-admin/upload.php3.23 ▲0.0046.43 ▲13.29

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Menu Rocker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.26 ▼1.032.01 ▲0.1443.47 ▼0.62
Dashboard /wp-admin2,203 ▲154.87 ▼1.19114.77 ▲10.6942.84 ▼0.09
Posts /wp-admin/edit.php2,092 ▲32.01 ▼0.0044.61 ▲10.2338.14 ▲0.84
Add New Post /wp-admin/post-new.php1,533 ▲1923.47 ▲5.85608.16 ▼64.9449.68 ▼3.17
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0296.01 ▼15.0042.01 ▼4.61

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× 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/linkrocker/linksplugin.php:46

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)
There were no browser issues found

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Screenshots: Add an image for screenshot #1 (Outlay after installing plugin)
Please take inspiration from this readme.txt

linkrocker/linksplugin.php 92% from 13 tests

"Menu Rocker" version 3.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("linkrocker.php" instead of "linksplugin.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
No dangerous file extensions were detected54 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1252954

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions4
▷ Named functions4100.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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
linksrocker.png65.74KB26.85KB▼ 59.15%