94% menubar-widgets

Code Review | Menubar Widgets

WordPress plugin Menubar Widgets scored 94% from 54 tests.

About plugin

  • Plugin page: menubar-widgets
  • Plugin version: 0.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8.1
  • WordPress version: 5.8.1
  • First release: Mar 10, 2014
  • Latest release: Mar 10, 2014
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: rss_samuel (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active / 13,327 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

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

Server-side resources used by Menubar Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1431.64 ▲8.80
Dashboard /wp-admin3.08 ▲0.0340.69 ▼2.74
Posts /wp-admin/edit.php3.13 ▲0.0234.94 ▼5.18
Add New Post /wp-admin/post-new.php5.44 ▲0.0085.92 ▼569.54
Media Library /wp-admin/upload.php3.02 ▲0.0232.38 ▲4.22

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Menubar Widgets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8315.87 ▲0.306.62 ▼1.2551.07 ▼3.95
Dashboard /wp-admin2,970 ▲335.93 ▲0.00134.80 ▼13.71118.51 ▼0.49
Posts /wp-admin/edit.php2,739 ▼02.69 ▲0.0164.05 ▼0.5491.11 ▲3.39
Add New Post /wp-admin/post-new.php1,498 ▼18518.85 ▲0.29366.69 ▲3.29109.63 ▲4.09
Media Library /wp-admin/upload.php1,804 ▲565.01 ▲0.01145.70 ▼4.25118.20 ▼4.98

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× 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/menubar-widgets/menubar-widgets.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Walker_Nav_Menu' not found in wp-content/plugins/menubar-widgets/inc/Walker_Menubar_Widgets.class.php:3

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)
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
4 plugin tags: widgets, widget, navigation, menu

menubar-widgets/menubar-widgets.php Passed 13 tests

The main PHP file in "Menubar Widgets" ver. 0.1.0 adds more information about the plugin and also serves as the entry point for this plugin
88 characters long description:
A standard wordpress plugin that helps you add multiple widgets to navigation menu item.

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
Good job! No executable or dangerous file extensions detected826 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP313251529
PO File27274223
CSS18034
Markdown114027
JavaScript13113

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity38.00
▷ Minimum class complexity37.00
▷ Maximum class complexity39.00
Average method complexity6.21
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods15
▷ Static methods00.00%
▷ Public methods15100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin