94% wpfront-notification-bar

Code Review | WPFront Notification Bar

WordPress plugin WPFront Notification Bar scored 94% from 54 tests.

About plugin

  • Plugin page: wpfront-notificat...
  • Plugin version: 3.2.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.9
  • WordPress version: 5.8.1
  • First release: Dec 11, 2013
  • Latest release: Jan 23, 2022
  • Number of updates: 111
  • Update frequency: every 26.7 days
  • Top authors: syammohanm (100%)

Code review

54 tests

User reviews

121 reviews

Install metrics

60,000+ active / 608,352 total downloads


Plugin footprint Passed 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: ▲0.79MB] [CPU: ▼182.00ms] Passed 4 tests

Server-side resources used by WPFront Notification Bar
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.8232.07 ▲3.12
Dashboard /wp-admin3.89 ▲0.8338.07 ▼7.28
Posts /wp-admin/edit.php3.94 ▲0.8337.62 ▲4.09
Add New Post /wp-admin/post-new.php6.19 ▲0.7474.27 ▼727.93
Media Library /wp-admin/upload.php3.77 ▲0.7731.24 ▲4.29
Notification Bar /wp-admin/options-general.php?page=wpfront-notification-bar3.9336.80

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 76 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WPFront Notification Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,671 ▲7015.98 ▼0.025.00 ▼3.6076.57 ▲0.51
Dashboard /wp-admin2,935 ▲396.14 ▼0.04116.80 ▼16.68167.73 ▼11.01
Posts /wp-admin/edit.php2,748 ▲83.22 ▲0.0062.84 ▼0.67135.56 ▲0.31
Add New Post /wp-admin/post-new.php3,738 ▼7519.19 ▲0.02441.12 ▼24.55158.67 ▼0.52
Media Library /wp-admin/upload.php1,757 ▲55.50 ▲0.01143.35 ▲3.30186.60 ▲3.64
Notification Bar /wp-admin/options-general.php?page=wpfront-notification-bar4,6746.41145.49209.14

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPFront\otification_Bar\\apply_filters() in wp-content/plugins/wpfront-notification-bar/classes/class-wpfront-notification-bar.php:64

User-side errors Passed 1 test

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


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 28 tag instead of maximum 10
Please take inspiration from this readme.txt

wpfront-notification-bar/wpfront-notification-bar.php Passed 13 tests

The main PHP script in "WPFront Notification Bar" version 3.2.0 is automatically included on every request by WordPress
72 characters long description:
Easily lets you create a bar on top or bottom to display a notification.

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
There were no executable files found in this plugin3,962 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity40.57
▷ Minimum class complexity12.00
▷ Maximum class complexity127.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods10.81%
▷ Public methods6653.23%
▷ Protected methods5443.55%
▷ Private methods43.23%
▷ Named functions125.00%
▷ Anonymous functions375.00%
▷ Global constants00.00%
▷ Class constants10100.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
39 PNG files occupy 0.07MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
jquery-plugins/colorpicker/images/colorpicker_rgb_r.png1.04KB0.77KB▼ 26.17%
jquery-plugins/colorpicker/images/custom_rgb_r.png0.99KB0.74KB▼ 25.34%
jquery-plugins/jquery-ui/smoothness/images/ui-bg_flat_75_ffffff_40x100.png0.20KB0.08KB▼ 58.17%
jquery-plugins/colorpicker/images/custom_rgb_b.png0.98KB0.74KB▼ 25.00%
jquery-plugins/jquery-ui/smoothness/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%