68% notification-bar-v

Code Review | Vertical Notification Bar

WordPress plugin Vertical Notification Bar scored68%from 54 tests.

About plugin

  • Plugin page: notification-bar-v
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2+
  • WordPress version: 6.3.1
  • First release: Jun 23, 2014
  • Latest release: Jun 23, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: umarbajwa (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,185 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.87MB] [CPU: ▼49.71ms] Passed 4 tests

This is a short check of server-side resources used by Vertical Notification Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.346.14 ▼32.88
Dashboard /wp-admin2.14 ▼1.175.25 ▼39.52
Posts /wp-admin/edit.php2.14 ▼1.225.73 ▼42.30
Add New Post /wp-admin/post-new.php2.14 ▼3.756.85 ▼84.12
Media Library /wp-admin/upload.php2.14 ▼1.095.16 ▼31.14

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 24 new options
New WordPress options
mcb_border_width
widget_theysaidso_widget
mcb_bar_position
mcb_bar_width
mcb_vertical_position
db_upgraded
mcb_email_cta
widget_recent-comments
mcb_cta_email_url
mcb_border_color
...

Browser metrics Passed 4 tests

An overview of browser requirements for Vertical Notification Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,928 ▲19314.05 ▼0.547.62 ▲6.0159.28 ▲18.46
Dashboard /wp-admin2,229 ▲374.79 ▼0.18102.59 ▼10.2740.99 ▼0.86
Posts /wp-admin/edit.php2,109 ▲202.01 ▲0.0239.90 ▲5.4135.23 ▼0.72
Add New Post /wp-admin/post-new.php1,531 ▲1223.01 ▼0.09648.03 ▼24.4753.07 ▼12.33
Media Library /wp-admin/upload.php1,405 ▲174.21 ▲0.0893.67 ▼19.9941.08 ▼6.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > 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 handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin did not uninstall successfully, leaving 24 options in the database
    • mcb_background_color
    • mcb_vertical_position
    • mcb_content
    • mcb_cta_email_url
    • widget_theysaidso_widget
    • mcb_cta_button_url
    • mcb_gradient_color_
    • mcb_button_cta
    • db_upgraded
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/notification-bar-v/mp_style.php
  • 24× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: mcb_gradient_color in wp-content/plugins/notification-bar-v/mp_style.php on line 16
    • > PHP Notice
      Undefined variable: mcb_background_color in wp-content/plugins/notification-bar-v/mp_style.php on line 90
    • > PHP Notice
      Undefined variable: mcb_border_width in wp-content/plugins/notification-bar-v/mp_style.php on line 22
    • > PHP Notice
      Undefined variable: mcb_gradient_color in wp-content/plugins/notification-bar-v/mp_style.php on line 91
    • > PHP Notice
      Undefined variable: mcb_vertical_position in wp-content/plugins/notification-bar-v/mp_style.php on line 9
    • > PHP Notice
      Undefined variable: mcb_bar_position in wp-content/plugins/notification-bar-v/mp_style.php on line 21
    • > PHP Notice
      Undefined variable: mcb_gradient_color in wp-content/plugins/notification-bar-v/mp_style.php on line 62
    • > PHP Notice
      Undefined variable: mcb_show_close_button in wp-content/plugins/notification-bar-v/mp_style.php on line 73
    • > PHP Notice
      Undefined variable: mcb_background_color in wp-content/plugins/notification-bar-v/mp_style.php on line 15
    • > PHP Notice
      Undefined variable: mcb_text_wrap in wp-content/plugins/notification-bar-v/mp_style.php on line 33

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

notification-bar-v/index.php 92% from 13 tests

This is the main PHP file of "Vertical Notification Bar" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("notification-bar-v.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin377 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP29524362
JavaScript12015

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin