90% clean-menus

Code Review | Clean Menus

WordPress plugin Clean Menus scored90%from 54 tests.

About plugin

  • Plugin page: clean-menus
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 7.0-6.4
  • WordPress version: 6.3.1
  • First release: Oct 12, 2016
  • Latest release: Oct 27, 2023
  • Number of updates: 11
  • Update frequency: every 233.7 days
  • Top authors: loyaltymanufaktur (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /787 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.80ms] Passed 4 tests

A check of server-side resources used by Clean Menus
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.55 ▼0.69
Dashboard /wp-admin3.31 ▲0.0145.73 ▲1.09
Posts /wp-admin/edit.php3.36 ▲0.0141.85 ▼2.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0176.88 ▼12.59
Media Library /wp-admin/upload.php3.24 ▲0.0137.47 ▲0.30

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Clean Menus: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.161.65 ▼0.2338.48 ▼4.90
Dashboard /wp-admin2,198 ▲245.56 ▼0.0182.71 ▼5.5239.26 ▼2.11
Posts /wp-admin/edit.php2,100 ▼31.99 ▲0.0233.54 ▼3.1737.71 ▲4.26
Add New Post /wp-admin/post-new.php1,526 ▼023.62 ▲0.57675.24 ▼25.6857.27 ▼0.24
Media Library /wp-admin/upload.php1,397 ▼34.35 ▲0.1499.15 ▲3.7243.68 ▼0.25

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% 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
These attributes need your attention:
  • Screenshots: Screenshot #1 (Sample 1) image missing
The official readme.txt might help

clean-menus/clean-menus.php Passed 13 tests

The primary PHP file in "Clean Menus" version 1.0.5 is used by WordPress to initiate all plugin functionality
115 characters long description:
Cleaning navigation menus by hiding all draft posts, pending review posts, future posts, private and trashed posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin31 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP282331

PHP code Passed 2 tests

Analyzing 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.45
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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

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