89% awesome-alert-blocks

Code Review | Awesome Alert Blocks

WordPress plugin Awesome Alert Blocks scored89%from 54 tests.

About plugin

  • Plugin page: awesome-alert-blocks
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.0.3
  • WordPress version: 6.3.1
  • First release: May 21, 2019
  • Latest release: May 21, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: raihancse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /958 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Awesome Alert Blocks
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.96 ▼4.06
Dashboard /wp-admin3.32 ▲0.0144.28 ▼4.70
Posts /wp-admin/edit.php3.37 ▲0.0149.59 ▲4.18
Add New Post /wp-admin/post-new.php5.90 ▲0.0290.98 ▼11.52
Media Library /wp-admin/upload.php3.24 ▲0.0137.09 ▲3.41

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Awesome Alert Blocks
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.72 ▲0.001.79 ▼0.0238.95 ▲2.64
Dashboard /wp-admin2,195 ▲185.64 ▼0.0385.11 ▼15.8240.79 ▼3.26
Posts /wp-admin/edit.php2,100 ▲32.00 ▲0.0337.89 ▼1.1631.01 ▼1.52
Add New Post /wp-admin/post-new.php6,196 ▲4,67026.16 ▲3.34820.59 ▲212.4797.00 ▲21.52
Media Library /wp-admin/upload.php1,403 ▲34.16 ▼0.0198.40 ▼6.2843.18 ▼0.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Example of Simple Alert Blocks on the frontend with different styles.), #2 (Example of Block Editor and creating a simple alert block.), #3 (Example of front-end of block created from previous screenshot.)
The official readme.txt is a good inspiration

awesome-alert-blocks/plugin.php 92% from 13 tests

The primary PHP file in "Awesome Alert Blocks" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("awesome-alert-blocks.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin595 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript63383379
CSS33523155
PHP2105650
Sass11111

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected