84% wp-alert-bar

Code Review | WordPress Alert Bar

WordPress plugin WordPress Alert Bar scored84%from 54 tests.

About plugin

  • Plugin page: wp-alert-bar
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7.0-6.0.3
  • WordPress version: 6.3.1
  • First release: Jun 4, 2020
  • Latest release: Apr 4, 2023
  • Number of updates: 11
  • Update frequency: every 94.1 days
  • Top authors: braceomatic88 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,020 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

An overview of server-side resources used by WordPress Alert Bar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0740.22 ▼6.03
Dashboard /wp-admin3.36 ▲0.0648.23 ▲1.00
Posts /wp-admin/edit.php3.41 ▲0.0645.87 ▼0.61
Add New Post /wp-admin/post-new.php5.94 ▲0.0689.88 ▼6.61
Media Library /wp-admin/upload.php3.28 ▲0.0633.87 ▲2.84

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for WordPress Alert Bar
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲12713.82 ▼0.546.28 ▲4.1943.25 ▲1.92
Dashboard /wp-admin2,209 ▲174.85 ▼1.08113.03 ▲7.2342.70 ▼0.74
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0038.08 ▼0.7635.71 ▼2.64
Add New Post /wp-admin/post-new.php1,528 ▲1118.25 ▲0.67641.54 ▼22.7459.43 ▲8.07
Media Library /wp-admin/upload.php1,391 ▲34.20 ▼0.0197.95 ▼0.1543.51 ▼1.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-alert-bar/admin/mbwpab-customizer-options.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-alert-bar/admin/mbwpab-customizer-styles.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-alert-bar/admin/mbwpab-customizer-scripts.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-alert-bar/public/wp-alert-bar-public.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: A description for screenshot #5 is missing in wp-alert-bar/assets to your readme.txt
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

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

The main PHP script in "WordPress Alert Bar" version 1.0.3 is automatically included on every request by WordPress
30 characters long description:
Alert Bar Plugin for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected12,800 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,299
CSS31,499243,109
PHP58431392

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin