89% wp-notification-bars

Code Review | WP Notification Bars

WordPress plugin WP Notification Bars scored89%from 54 tests.

About plugin

  • Plugin page: wp-notification-bars
  • Plugin version: 1.0.12
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9.1
  • WordPress version: 6.3.1
  • First release: Sep 19, 2015
  • Latest release: Feb 28, 2022
  • Number of updates: 30
  • Update frequency: every 78.5 days
  • Top authors: MyThemeShop (86.67%)pbalazs (13.33%)roymahfooz (6.67%)

Code review

54 tests

User reviews

41 reviews

Install metrics

20,000+ active /325,427 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.29MB] [CPU: ▼4.69ms] Passed 4 tests

This is a short check of server-side resources used by WP Notification Bars
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2942.82 ▲0.15
Dashboard /wp-admin3.59 ▲0.2949.04 ▲0.09
Posts /wp-admin/edit.php3.71 ▲0.3551.61 ▲3.04
Add New Post /wp-admin/post-new.php6.20 ▲0.3182.48 ▼22.05
Media Library /wp-admin/upload.php3.51 ▲0.2840.05 ▲6.91
Add New /wp-admin/post-new.php?post_type=mts_notification_bar3.5542.57
All Notification Bars /wp-admin/edit.php?post_type=mts_notification_bar3.5536.69

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 24 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
mtsnb_stats
theysaidso_admin_options
widget_theysaidso_widget
wp_notification_bar_notice_views
db_upgraded
wp_notification_bar_activated

Browser metrics Passed 4 tests

WP Notification Bars: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9714.47 ▲0.081.57 ▼0.1239.30 ▼3.93
Dashboard /wp-admin2,246 ▲554.86 ▼1.15103.92 ▼2.4544.37 ▲5.53
Posts /wp-admin/edit.php2,128 ▲392.00 ▲0.0041.57 ▲3.4436.61 ▼2.24
Add New Post /wp-admin/post-new.php6,296 ▲4,76326.21 ▲3.11948.84 ▲344.6144.19 ▼13.43
Media Library /wp-admin/upload.php1,424 ▲364.19 ▼0.08109.94 ▲9.7850.17 ▲4.19
Add New /wp-admin/post-new.php?post_type=mts_notification_bar2,3223.0898.7040.89
All Notification Bars /wp-admin/edit.php?post_type=mts_notification_bar1,0831.9830.6929.40

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_recent-comments
    • wp_notification_bar_notice_views
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • mtsnb_stats
    • db_upgraded
    • wp_notification_bar_activated
    • theysaidso_admin_options

Smoke tests Passed 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)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: A description for screenshot #5 is missing in wp-notification-bars/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
The official readme.txt might help

wp-notification-bars/wp-notification-bars.php 92% from 13 tests

This is the main PHP file of "WP Notification Bars" version 1.0.12, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 190 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected1,722 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP113317491,293
JavaScript44733232
CSS3025197

PHP code Passed 2 tests

This is a short overview 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.53
Average class complexity31.88
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity5.57
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods54
▷ Static methods35.56%
▷ Public methods4787.04%
▷ Protected methods00.00%
▷ Private methods712.96%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected