84% simple-alert-boxes

Code Review | Simple Alert Boxes

WordPress plugin Simple Alert Boxes scored84%from 54 tests.

About plugin

  • Plugin page: simple-alert-boxes
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Mar 23, 2015
  • Latest release: Feb 6, 2018
  • Number of updates: 32
  • Update frequency: every 32.8 days
  • Top authors: mardojai (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

500+ active /6,970 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
The plugin installed gracefully, with no errors

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

Server-side resources used by Simple Alert Boxes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0134.49 ▼3.53
Dashboard /wp-admin3.32 ▲0.0243.20 ▼7.03
Posts /wp-admin/edit.php3.37 ▲0.0148.03 ▲5.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0188.54 ▲0.73
Media Library /wp-admin/upload.php3.24 ▲0.0132.91 ▼0.15

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Simple Alert Boxes: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6213.28 ▼1.351.67 ▼0.3739.36 ▼5.52
Dashboard /wp-admin2,208 ▲205.86 ▲1.01108.15 ▼17.6942.20 ▼1.14
Posts /wp-admin/edit.php2,094 ▲52.05 ▲0.0338.63 ▲1.7234.28 ▼1.79
Add New Post /wp-admin/post-new.php1,532 ▲423.14 ▼0.21653.80 ▼20.8953.86 ▲3.19
Media Library /wp-admin/upload.php1,393 ▲24.17 ▼0.0996.46 ▼2.3044.55 ▼3.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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
  • 1× 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/simple-alert-boxes/plugin.php:49

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: You can look at the official readme.txt

simple-alert-boxes/plugin.php 92% from 13 tests

The main PHP file in "Simple Alert Boxes" ver. 1.4.0 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("simple-alert-boxes.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected324 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS2010144
LESS1131178
PHP1177652
JavaScript12250

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.04
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin