84% alert-box-block

Code Review | Alert Box Block - Display notice/alerts in the front end.

WordPress plugin Alert Box Block - Display notice/alerts in the front end. scored84%from 54 tests.

About plugin

  • Plugin page: alert-box-block
  • Plugin version: 1.0.9
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Oct 13, 2021
  • Latest release: Oct 3, 2023
  • Number of updates: 32
  • Update frequency: every 22.5 days
  • Top authors: charlescormier (84.38%)abuhayat (18.75%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /2,942 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
Installer ran successfully

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

Server-side resources used by Alert Box Block - Display notice/alerts in the front end.
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.02 ▼1.90
Dashboard /wp-admin3.32 ▼0.0244.50 ▼14.57
Posts /wp-admin/edit.php3.37 ▲0.0242.57 ▼1.81
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.39 ▼19.48
Media Library /wp-admin/upload.php3.25 ▲0.0242.55 ▲11.27

Server storage [IO: ▲1.37MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Alert Box Block - Display notice/alerts in the front end.: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲4514.35 ▼0.221.66 ▲0.1246.54 ▲8.98
Dashboard /wp-admin2,198 ▲235.64 ▼0.0594.91 ▼2.2141.18 ▼2.77
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0132.88 ▼2.2535.09 ▼2.12
Add New Post /wp-admin/post-new.php6,368 ▲4,84228.41 ▲5.33909.69 ▲221.6659.20 ▲11.57
Media Library /wp-admin/upload.php1,397 ▼64.12 ▼0.11109.55 ▲13.5346.01 ▲2.70

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant ABB_VERSION - assumed 'ABB_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/alert-box-block/dist/editor.asset.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/alert-box-block/inc/block.php:4
    • > PHP Warning
      Use of undefined constant ABB_VERSION - assumed 'ABB_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/alert-box-block/dist/script.asset.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Requires at least: Version not formatted correctly
You can look at the official readme.txt

alert-box-block/plugin.php 92% from 13 tests

The entry point to "Alert Box Block - Display notice/alerts in the front end." version 1.0.9 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("alert-box-block.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected339 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JSON300208
PO File1315580
PHP5111346
CSS3063
JavaScript2022

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
No PNG files were detected