84% better-menu-widget

Code Review | Better Menu Widget

WordPress plugin Better Menu Widget scored84%from 54 tests.

About plugin

  • Plugin page: better-menu-widget
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9
  • WordPress version: 6.3.1
  • First release: Mar 7, 2013
  • Latest release: Feb 10, 2019
  • Number of updates: 50
  • Update frequency: every 43.3 days
  • Top authors: TraceyHolinka (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

1,000+ active /24,008 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.11ms] Passed 4 tests

This is a short check of server-side resources used by Better Menu Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.43 ▲0.06
Dashboard /wp-admin3.34 ▲0.0346.07 ▼3.20
Posts /wp-admin/edit.php3.39 ▲0.0343.35 ▼1.79
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.26 ▲2.38
Media Library /wp-admin/upload.php3.26 ▲0.0334.84 ▲0.48

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_better-menu-widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Better Menu Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.70 ▼0.691.79 ▼0.0140.65 ▼3.32
Dashboard /wp-admin2,203 ▲155.83 ▼0.0798.07 ▼4.3439.12 ▼1.82
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0640.53 ▲4.5236.49 ▲1.42
Add New Post /wp-admin/post-new.php1,533 ▼023.11 ▼0.24596.90 ▼96.7855.26 ▼1.38
Media Library /wp-admin/upload.php1,388 ▲34.22 ▲0.03101.89 ▼0.7242.38 ▼2.40

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_better-menu-widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-menu-widget/better-menu-widget.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: menus, navigation, widget

better-menu-widget/better-menu-widget.php Passed 13 tests

The main PHP script in "Better Menu Widget" version 1.5.1 is automatically included on every request by WordPress
104 characters long description:
Better Menu Widget makes it easy to customize your menu widgets by adding css styles and a heading link.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected102 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13088102

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.60
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin