84% menubar

Code Review | Menubar

WordPress plugin Menubar scored84%from 54 tests.

About plugin

  • Plugin page: menubar
  • Plugin version: 5.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Mar 28, 2009
  • Latest release: Aug 13, 2023
  • Number of updates: 89
  • Update frequency: every 59.0 days
  • Top authors: dontdream (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

2,000+ active /173,235 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.48ms] Passed 4 tests

This is a short check of server-side resources used by Menubar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.92 ▲1.06
Dashboard /wp-admin3.32 ▲0.0244.12 ▼10.25
Posts /wp-admin/edit.php3.38 ▲0.0248.73 ▲4.01
Add New Post /wp-admin/post-new.php5.91 ▲0.0294.89 ▼4.29
Media Library /wp-admin/upload.php3.25 ▲0.0235.29 ▲3.56
Menubar /wp-admin/themes.php?page=menubar/wpm-admin.php3.4130.43

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 38 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_menubar
menubar
can_compress_scripts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Menubar: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.33 ▼1.052.07 ▲0.3041.82 ▼5.66
Dashboard /wp-admin2,210 ▲195.90 ▼0.01105.27 ▲7.8343.32 ▲0.46
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0438.64 ▼0.1934.67 ▲0.29
Add New Post /wp-admin/post-new.php1,517 ▼2517.64 ▼0.52600.00 ▼48.6044.99 ▼4.76
Media Library /wp-admin/upload.php1,395 ▲74.18 ▼0.1597.00 ▼2.2542.35 ▼0.91
Menubar /wp-admin/themes.php?page=menubar/wpm-admin.php8002.0424.6726.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 8 options
    • menubar
    • widget_recent-posts
    • can_compress_scripts
    • widget_menubar
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 6× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined variable: action in wp-content/plugins/menubar/wpm-edit-menu.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/menubar/wpm-admin.php:289
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/menubar/wpm-main.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/menubar/wpm-main.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/menubar/wpm-db.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/menubar/wpm-edit-menu.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: suckerfish, navigation, superfish, menubar, menu

menubar/wpm-main.php 92% from 13 tests

The main file in "Menubar" v. 5.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("menubar.php" instead of "wpm-main.php")

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
There were no executable files found in this plugin3,753 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP12560562,237
CSS121601401,270
JavaScript11814246

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions90
▷ Named functions90100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
7 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/Suckerfish_45/shadow.png0.18KB0.13KB▼ 29.12%
templates/Suckerfish_45/sf-grey.png0.17KB0.25KB0.00%
templates/Superfish/shadow.png1.66KB1.57KB▼ 5.24%
templates/Superfish/searchbox.png0.48KB0.38KB▼ 20.12%
templates/CSSmb_46/cssmb.png0.96KB0.88KB▼ 8.17%