89% notibar

Code Review | Notibar - Notification Bar for WordPress

WordPress plugin Notibar - Notification Bar for WordPress scored89%from 54 tests.

About plugin

  • Plugin page: notibar
  • Plugin version: 2.1.4
  • PHP compatiblity: 5.3.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 24, 2020
  • Latest release: Sep 8, 2023
  • Number of updates: 52
  • Update frequency: every 20.8 days
  • Top authors: ninjateam (100%)

Code review

54 tests

User reviews

45 reviews

Install metrics

7,000+ active /73,324 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲1.42ms] Passed 4 tests

A check of server-side resources used by Notibar - Notification Bar for WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1446.76 ▲1.31
Dashboard /wp-admin3.35 ▲0.0561.73 ▲3.09
Posts /wp-admin/edit.php3.47 ▲0.1150.79 ▲0.79
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.39 ▲0.49
Media Library /wp-admin/upload.php3.28 ▲0.0541.19 ▲5.34

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 40 new files
Database: no new tables, 18 new options
New WordPress options
widget_recent-posts
njt_nofi_text_mobile_wpml_translate
njt_nofi_text_wpml_translate
theysaidso_admin_options
njt_nofi_lb_url_wpml_translate
njt_nofi_first_time_active
can_compress_scripts
db_upgraded
njt_nofi_review
njt_nofi_lb_url_mobile_wpml_translate
...

Browser metrics Passed 4 tests

A check of browser resources used by Notibar - Notification Bar for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,144 ▲35813.54 ▼0.7218.91 ▲16.1825.71 ▼21.97
Dashboard /wp-admin2,261 ▲845.55 ▼0.1286.50 ▼8.1067.41 ▲24.20
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0233.15 ▼4.0235.65 ▲1.21
Add New Post /wp-admin/post-new.php1,529 ▲123.32 ▲0.12686.03 ▼23.4160.52 ▲5.93
Media Library /wp-admin/upload.php1,412 ▲94.22 ▼0.02111.24 ▼0.3850.40 ▲6.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 18 options in the database
    • widget_recent-comments
    • njt_nofi_text_wpml_translate
    • njt_popup_filebird_cross
    • db_upgraded
    • njt_nofi_version
    • widget_recent-posts
    • njt_nofi_lb_text_wpml_translate
    • njt_nofi_text_mobile_wpml_translate
    • njt_nofi_lb_text_mobile_wpml_translate
    • njt_nofi_lb_url_mobile_wpml_translate
    • ...

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
The SRP test was a success

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt might help

notibar/njt-notification-bar.php 92% from 13 tests

The entry point to "Notibar - Notification Bar for WordPress" version 2.1.4 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("notibar.php" instead of "njt-notification-bar.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected5,285 lines of code in 33 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript6191842,390
PHP22312852,049
CSS3721698
PO File15466138
XML10010

PHP code 50% from 2 tests

This plugin's cyclomatic complexity and code structure detailed below
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 188)
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity20.45
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity7.10
▷ Minimum method complexity1.00
▷ Maximum method complexity188.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods64
▷ Static methods1218.75%
▷ Public methods5992.19%
▷ Protected methods00.00%
▷ Private methods57.81%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants6
▷ Global constants6100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/admin/img/FB_Wireframe.png10.56KB4.88KB▼ 53.83%