90% simple-alert-blocks

Code Review | Simple Alert Blocks

WordPress plugin Simple Alert Blocks scored90%from 54 tests.

About plugin

  • Plugin page: simple-alert-blocks
  • Plugin version: 1.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 24, 2019
  • Latest release: Sep 7, 2022
  • Number of updates: 20
  • Update frequency: every 66.2 days
  • Top authors: andrewza (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /4,115 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.50ms] Passed 4 tests

This is a short check of server-side resources used by Simple Alert Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.49 ▼2.73
Dashboard /wp-admin3.32 ▼0.0349.06 ▼16.57
Posts /wp-admin/edit.php3.37 ▲0.0150.24 ▼5.13
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.28 ▼13.58
Media Library /wp-admin/upload.php3.24 ▲0.0133.13 ▼2.52

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple Alert Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.27 ▲0.131.70 ▼0.0941.87 ▲0.48
Dashboard /wp-admin2,195 ▲185.63 ▼0.0488.08 ▼4.5842.21 ▼1.65
Posts /wp-admin/edit.php2,100 ▼32.02 ▲0.0040.19 ▼0.0037.01 ▼0.83
Add New Post /wp-admin/post-new.php6,364 ▲4,83527.78 ▲4.53938.39 ▲216.2664.83 ▲5.51
Media Library /wp-admin/upload.php1,397 ▼34.19 ▼0.03100.47 ▼11.8841.58 ▼7.44

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention: The official readme.txt might help

simple-alert-blocks/simple-alert-blocks.php Passed 13 tests

The main PHP script in "Simple Alert Blocks" version 1.3 is automatically included on every request by WordPress
53 characters long description:
Create a simple alert notice in the new Block Editor.

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
There were no executable files found in this plugin480 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS1672254
JavaScript21148193
PHP262633

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions2
▷ Named functions2100.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
PNG images were not found in this plugin