84% notification-bar-notibar

Code Review | The NotiBar

WordPress plugin The NotiBar scored 84% from 54 tests.

About plugin

  • Plugin page: notification-bar-...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.0-3.1.2
  • WordPress version: 5.8.1
  • First release: Nov 14, 2012
  • Latest release: Nov 16, 2012
  • Number of updates: 10
  • Update frequency: every 0.2 days
  • Top authors: notibar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.87MB] [CPU: ▼173.38ms] Passed 4 tests

An overview of server-side resources used by The NotiBar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0029.85 ▼1.97
Dashboard /wp-admin2.78 ▼0.2819.16 ▼23.50
Posts /wp-admin/edit.php2.78 ▼0.3316.44 ▼18.62
Add New Post /wp-admin/post-new.php2.78 ▼2.6614.53 ▼638.71
Media Library /wp-admin/upload.php2.78 ▼0.2214.00 ▼12.67

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for The NotiBar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,690 ▲8915.65 ▲0.006.01 ▲1.0276.20 ▲1.66
Dashboard /wp-admin2,957 ▲586.17 ▲0.03113.49 ▼18.55184.20 ▲12.07
Posts /wp-admin/edit.php2,748 ▲83.13 ▼0.0964.31 ▲2.18141.46 ▲2.38
Add New Post /wp-admin/post-new.php3,723 ▼8518.96 ▲2.03415.12 ▼53.85186.40 ▲21.69
Media Library /wp-admin/upload.php1,776 ▲275.53 ▼0.03126.76 ▼11.39198.01 ▲1.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin cannot be uninstalled
    • > User deprecated in wp-includes/functions.php+5495
    has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/notification-bar-notibar/notibar.php:161
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/notification-bar-notibar/views/options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Notification Bar example.), #2 (NotiBar WordPress plugin interface.)
You can take inspiration from this readme.txt

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

This is the main PHP file of "The NotiBar" version 0.1, 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: The principal plugin file should be the same as the plugin slug ("notification-bar-notibar.php" instead of "notibar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected121 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23032121
CSS1030
JavaScript1010

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods466.67%
▷ Protected methods00.00%
▷ Private methods233.33%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/icon.png1.37KB0.59KB▼ 57.08%