84% menu-buttons

Code Review | Menu Buttons

WordPress plugin Menu Buttons scored84%from 54 tests.

About plugin

  • Plugin page: menu-buttons
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Dec 11, 2015
  • Latest release: Dec 16, 2015
  • Number of updates: 5
  • Update frequency: every 111.2 days
  • Top authors: devmatte (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

700+ active /21,937 total downloads

Benchmarks

Plugin footprint 83% 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: ▼7.43ms] Passed 4 tests

An overview of server-side resources used by Menu Buttons
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.68 ▼0.32
Dashboard /wp-admin3.32 ▼0.0346.94 ▼11.90
Posts /wp-admin/edit.php3.37 ▲0.0146.43 ▼2.75
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.20 ▼14.76
Media Library /wp-admin/upload.php3.24 ▲0.0138.87 ▲5.06
Menu Buttons /wp-admin/themes.php?page=mb_settings3.2133.88

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

A short overview of filesystem and database impact
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

Menu Buttons: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲5413.50 ▼0.775.41 ▲3.4342.02 ▲2.32
Dashboard /wp-admin2,218 ▲445.83 ▲0.1990.14 ▼4.1344.00 ▲2.14
Posts /wp-admin/edit.php2,125 ▲282.30 ▲0.3038.39 ▼0.1533.76 ▼1.00
Add New Post /wp-admin/post-new.php1,543 ▲723.34 ▲0.42600.72 ▲6.9334.07 ▼31.24
Media Library /wp-admin/upload.php1,426 ▲294.42 ▲0.25105.15 ▲3.4640.76 ▼4.80
Menu Buttons /wp-admin/themes.php?page=mb_settings1,6502.9869.9527.66

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/menu-buttons/menu-buttons.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: buttons, menu, menu button, menu buttons, button

menu-buttons/menu-buttons.php Passed 13 tests

This is the main PHP file of "Menu Buttons" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
25 characters long description:
Add buttons to your menu.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin179 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP14128176
JavaScript1003

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions5
▷ Named functions5100.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 images were found in this plugin