68% menubaron

Code Review | MenuBaron for WordPress

WordPress plugin MenuBaron for WordPress scored68%from 54 tests.

About plugin

  • Plugin page: menubaron
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: Mar 10, 2014
  • Latest release: Jul 6, 2015
  • Number of updates: 8
  • Update frequency: every 60.4 days
  • Top authors: menubaron (75%)csmicfool (37.5%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,146 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼1.88MB] [CPU: ▼55.64ms] Passed 4 tests

Server-side resources used by MenuBaron for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.358.54 ▼30.44
Dashboard /wp-admin2.14 ▼1.175.92 ▼48.15
Posts /wp-admin/edit.php2.14 ▼1.225.59 ▼43.74
Add New Post /wp-admin/post-new.php2.14 ▼3.765.44 ▼96.95
Media Library /wp-admin/upload.php2.14 ▼1.105.43 ▼33.71
FAQ /wp-admin/admin.php?page=edit_pages2.148.99
MenuBaron /wp-admin/admin.php?page=menubaron-options2.147.26

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for MenuBaron for WordPress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,930 ▲16914.99 ▲0.809.65 ▲7.8542.77 ▼2.66
Dashboard /wp-admin2,233 ▲625.48 ▼0.1898.48 ▲2.2581.16 ▲39.60
Posts /wp-admin/edit.php2,147 ▲502.40 ▲0.4646.66 ▲10.0634.67 ▼0.64
Add New Post /wp-admin/post-new.php1,554 ▲2823.38 ▲0.30708.13 ▲33.7635.38 ▼40.44
Media Library /wp-admin/upload.php1,432 ▲325.00 ▲0.79112.17 ▲0.1674.46 ▲23.57
FAQ /wp-admin/admin.php?page=edit_pages8632.3031.4954.44
MenuBaron /wp-admin/admin.php?page=menubaron-options8712.2831.0636.18

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_mb_specials_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=menubaron-options
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_script() in wp-content/plugins/menubaron/mbwp.php:14

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 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: restaurant, food presentation, food, restaurant website, restaurant menu

menubaron/mbwp.php 92% from 13 tests

"MenuBaron for WordPress" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("menubaron.php" instead of "mbwp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin19,740 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript33,6432,75318,408
CSS235541,096
PHP23138236

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity16.00
▷ Minimum class complexity16.00
▷ Maximum class complexity16.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity9.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%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
15 PNG files occupy 0.55MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png5.68KB1.83KB▼ 67.77%
css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png0.41KB0.15KB▼ 62.44%
css/ui-lightness/images/ui-icons_ef8c08_256x240.png4.44KB4.17KB▼ 6.02%
css/ui-lightness/images/ui-icons_228ef1_256x240.png4.44KB4.17KB▼ 6.02%
screenshot-1.png529.20KB152.36KB▼ 71.21%