94% wp-alert-bars

Code Review | WP Alert Bars

WordPress plugin WP Alert Bars scored 94% from 54 tests.

About plugin

  • Plugin page: wp-alert-bars
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.6
  • WordPress version: 5.8.1
  • First release: Jul 5, 2019
  • Latest release: Jan 12, 2021
  • Number of updates: 12
  • Update frequency: every 46.4 days
  • Top authors: mhmrajib (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 425 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼142.54ms] Passed 4 tests

This is a short check of server-side resources used by WP Alert Bars
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0234.59 ▲4.28
Dashboard /wp-admin3.07 ▲0.0148.34 ▲4.34
Posts /wp-admin/edit.php3.12 ▲0.0143.29 ▼1.44
Add New Post /wp-admin/post-new.php5.43 ▼0.0196.33 ▼576.66
Media Library /wp-admin/upload.php3.01 ▲0.0134.86 ▲3.67

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 23 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Alert Bars
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,809 ▲21316.33 ▲0.7711.26 ▲0.0552.79 ▼2.41
Dashboard /wp-admin2,987 ▲505.91 ▼0.22155.10 ▲3.77115.06 ▼8.00
Posts /wp-admin/edit.php2,759 ▲202.72 ▲0.0062.49 ▼9.8695.88 ▼0.63
Add New Post /wp-admin/post-new.php1,685 ▲218.85 ▲0.13381.49 ▼8.51115.57 ▲3.65
Media Library /wp-admin/upload.php1,827 ▲175.06 ▲0.03163.80 ▲9.85121.70 ▼1.94

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
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 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-alert-bars/admin/view/wab-settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-alert-bars/front/view/wab-front-view.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: alert bar, notification, bar, notification bar, alert

wp-alert-bars/wp-alert-bars.php Passed 13 tests

The main file in "WP Alert Bars" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
112 characters long description:
Allow users to display a notification/alert box in a Post or Page multiple times. Use shortcode: [wp_alert_bars]

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin416 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.75
▷ Minimum class complexity2.00
▷ Maximum class complexity6.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods1881.82%
▷ Protected methods14.55%
▷ Private methods313.64%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin