90% wpfront-notification-bar

Code Review | WPFront Notification Bar

WordPress plugin WPFront Notification Bar scored90%from 54 tests.

About plugin

  • Plugin page: wpfront-notificat...
  • Plugin version: 3.3.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 11, 2013
  • Latest release: Aug 2, 2023
  • Number of updates: 124
  • Update frequency: every 28.4 days
  • Top authors: syammohanm (100%)

Code review

54 tests

User reviews

126 reviews

Install metrics

50,000+ active /773,816 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.58MB] [CPU: ▼2.14ms] 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 /4.07 ▲0.6043.73 ▲3.14
Dashboard /wp-admin3.92 ▲0.6150.01 ▲1.78
Posts /wp-admin/edit.php3.97 ▲0.6147.52 ▼3.59
Add New Post /wp-admin/post-new.php6.44 ▲0.5582.24 ▼9.88
Media Library /wp-admin/upload.php3.78 ▲0.5536.96 ▲3.97
Notification Bar /wp-admin/options-general.php?page=wpfront-notification-bar3.9345.03

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 74 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WPFront Notification Bar
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲4714.72 ▲0.351.76 ▲0.1744.27 ▲4.41
Dashboard /wp-admin2,202 ▲255.62 ▲0.0097.16 ▲8.0241.27 ▼0.93
Posts /wp-admin/edit.php2,101 ▲12.02 ▲0.0333.84 ▼15.2735.66 ▼7.74
Add New Post /wp-admin/post-new.php1,529 ▲322.99 ▼0.71684.40 ▲11.1351.92 ▼4.82
Media Library /wp-admin/upload.php1,404 ▲44.24 ▲0.0596.23 ▼4.4240.14 ▼10.11
Notification Bar /wp-admin/options-general.php?page=wpfront-notification-bar3,4645.94126.4258.48

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

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.3.2 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 plugin4,199 lines of code in 29 files:
LanguageFilesBlank linesComment linesLines of code
PHP84648622,640
JavaScript1094551,032
CSS11665527

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 complexity49.83
▷ Minimum class complexity12.00
▷ Maximum class complexity137.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods128
▷ Static methods21.56%
▷ Public methods6853.12%
▷ Protected methods5744.53%
▷ Private methods32.34%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants10
▷ 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
38 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/jquery-ui/smoothness/images/ui-icons_cd0a0a_256x240.png4.44KB4.17KB▼ 6.02%
jquery-plugins/colorpicker/images/custom_rgb_g.png1.04KB0.80KB▼ 23.67%
jquery-plugins/colorpicker/images/custom_hex.png0.55KB0.39KB▼ 28.11%
jquery-plugins/colorpicker/images/colorpicker_rgb_b.png0.95KB0.76KB▼ 19.48%
jquery-plugins/jquery-ui/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%