79% simplify-menu-usage

Code Review | Simplify Menu Usage

WordPress plugin Simplify Menu Usage scored79%from 54 tests.

About plugin

  • Plugin page: simplify-menu-usage
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2020
  • Latest release: Oct 9, 2020
  • Number of updates: 6
  • Update frequency: every 13.0 days
  • Top authors: konstk (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /414 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.55MB] [CPU: ▼9.59ms] Passed 4 tests

A check of server-side resources used by Simplify Menu Usage
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.00 ▲0.5439.29 ▼3.40
Dashboard /wp-admin3.87 ▲0.5247.44 ▼15.46
Posts /wp-admin/edit.php3.98 ▲0.6246.45 ▲1.33
Add New Post /wp-admin/post-new.php6.47 ▲0.5886.18 ▼20.82
Media Library /wp-admin/upload.php3.79 ▲0.5642.28 ▲7.25
Simplify Menu Usage Settings /wp-admin/themes.php?page=simplify-menu-usage-page3.9536.04

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 98 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
smu_down_insert
db_upgraded
widget_recent-posts
widget_recent-comments
smu_is_rating_dismissed
can_compress_scripts
smu_display_menu_description

Browser metrics Passed 4 tests

Simplify Menu Usage: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲17013.54 ▼0.847.50 ▲5.4540.36 ▼1.85
Dashboard /wp-admin2,214 ▲264.81 ▼0.06109.04 ▼3.1140.63 ▼4.83
Posts /wp-admin/edit.php2,100 ▲112.04 ▲0.0136.62 ▼3.4933.78 ▼5.17
Add New Post /wp-admin/post-new.php1,521 ▼723.04 ▲0.17650.61 ▲29.0853.05 ▼4.76
Media Library /wp-admin/upload.php1,396 ▲84.29 ▲0.08122.66 ▲23.0950.26 ▲7.82
Simplify Menu Usage Settings /wp-admin/themes.php?page=simplify-menu-usage-page9721.7123.0931.49

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% 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 0% 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
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/simplify-menu-usage/public/partials/simplify-menu-usage-public-display.php
    • > /wp-content/plugins/simplify-menu-usage/admin/partials/simplify-menu-usage-admin-display.php
  • 28× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SimplifyMenuUsage\\SettingsLib\\Elements\\Validators\\Abstract_Validator' not found in wp-content/plugins/simplify-menu-usage/admin/settings_page/elements/validators/email-validator.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'SimplifyMenuUsage\\SettingsLib\\Elements\\Validators\\Abstract_Validator' not found in wp-content/plugins/simplify-menu-usage/admin/settings_page/elements/validators/abstract-whitelist-validator.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'SimplifyMenuUsage\\SettingsLib\\Elements\\Basic_Field' not found in wp-content/plugins/simplify-menu-usage/admin/settings_page/elements/fields/textarea.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SimplifyMenuUsage\\SettingsLib\\Elements\\Validators\\Abstract_Whitelist_Validator' not found in wp-content/plugins/simplify-menu-usage/admin/settings_page/elements/validators/dropdown-whitelist-validator.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'SimplifyMenuUsage\\SettingsLib\\Elements\\Basic_Field' not found in wp-content/plugins/simplify-menu-usage/admin/settings_page/elements/fields/dropdown.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'SimplifyMenuUsage\\Interfaces\\IConfigure' not found in wp-content/plugins/simplify-menu-usage/admin/settings_page/tab.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'SimplifyMenuUsage\\SettingsLib\\Elements\\Validators\\Abstract_Whitelist_Validator' not found in wp-content/plugins/simplify-menu-usage/admin/settings_page/elements/validators/checkbox-whitelist-validator.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'SimplifyMenuUsage\\SettingsLib\\Elements\\Validators\\Abstract_Validator' not found in wp-content/plugins/simplify-menu-usage/admin/settings_page/elements/validators/file-validator.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu_Edit' not found in wp-content/plugins/simplify-menu-usage/admin/classes/simplify-menu-usage-nav-item-walker.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'SimplifyMenuUsage\\SettingsLib\\Elements\\Validators\\Abstract_Validator' not found in wp-content/plugins/simplify-menu-usage/admin/settings_page/elements/validators/string-validator.php:6

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
10 plugin tags: menu item, menu-management, efficient, nav, optimize-workflow...

simplify-menu-usage/simplify-menu-usage.php Passed 13 tests

This is the main PHP file of "Simplify Menu Usage" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
106 characters long description:
Improves the handling of the menu section in the dashboard. Fast deleting and inserting/moving menu items.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected3,514 lines of code in 86 files:
LanguageFilesBlank linesComment linesLines of code
PHP804411972,573
JavaScript37577541
PO File160111248
CSS2384152

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity5.98
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.65
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces10
Interfaces4
Traits0
Classes47
▷ Abstract classes36.38%
▷ Concrete classes4493.62%
▷ Final classes00.00%
Methods165
▷ Static methods53.03%
▷ Public methods10463.03%
▷ Protected methods2917.58%
▷ Private methods3219.39%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.16MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/css/images/default-behavior.png36.56KB16.89KB▼ 53.79%
admin/css/images/same-level-behavior.png38.66KB18.87KB▼ 51.19%
admin/css/images/left-take-children-behavior.png24.88KB12.63KB▼ 49.22%
admin/css/images/left-default-behavior.png24.65KB12.47KB▼ 49.42%
admin/css/images/take-children-behavior.png38.82KB17.55KB▼ 54.80%