89% silencesoft-disable-menu-items

Code Review | Silencesoft Disable Menu Items

WordPress plugin Silencesoft Disable Menu Items scored89%from 54 tests.

About plugin

  • Plugin page: silencesoft-disab...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3.1
  • WordPress version: 6.3.1
  • First release: Apr 8, 2013
  • Latest release: Nov 16, 2015
  • Number of updates: 8
  • Update frequency: every 119.5 days
  • Top authors: silence (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

600+ active /7,249 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: ▼3.85ms] Passed 4 tests

An overview of server-side resources used by Silencesoft Disable Menu Items
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.55 ▼5.87
Dashboard /wp-admin3.32 ▲0.0252.91 ▼2.08
Posts /wp-admin/edit.php3.37 ▲0.0250.57 ▼1.64
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.26 ▼5.81
Media Library /wp-admin/upload.php3.25 ▲0.0236.59 ▲3.11

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Silencesoft Disable Menu Items
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.17 ▼1.231.83 ▲0.0749.55 ▲5.57
Dashboard /wp-admin2,206 ▲185.92 ▲0.06102.86 ▼17.7038.00 ▼6.59
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0338.11 ▲1.6032.67 ▼0.30
Add New Post /wp-admin/post-new.php1,546 ▲3223.17 ▲5.50616.00 ▼7.9445.96 ▼7.76
Media Library /wp-admin/upload.php1,391 ▲94.23 ▲0.0196.88 ▼3.5839.70 ▼4.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (Modifying a menu item) image missing
Please take inspiration from this readme.txt

silencesoft-disable-menu-items/sil-disable-menu-items.php 92% from 13 tests

This is the main PHP file of "Silencesoft Disable Menu Items" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("silencesoft-disable-menu-items.php" instead of "sil-disable-menu-items.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected3,754 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3632,0843,716
PO File22238

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity63.20
▷ Minimum class complexity1.00
▷ Maximum class complexity555.00
Average method complexity4.47
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes14
▷ Abstract classes214.29%
▷ Concrete classes1285.71%
▷ Final classes00.00%
Methods271
▷ Static methods7326.94%
▷ Public methods22683.39%
▷ Protected methods4315.87%
▷ Private methods20.74%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png35.45KB15.32KB▼ 56.80%