78% simple-alert-system

Code Review | Simple Alert System

WordPress plugin Simple Alert System scored78%from 54 tests.

About plugin

  • Plugin page: simple-alert-system
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Sep 17, 2020
  • Latest release: Jun 20, 2023
  • Number of updates: 57
  • Update frequency: every 17.7 days
  • Top authors: sleekchib (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /4,654 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼11.96ms] Passed 4 tests

This is a short check of server-side resources used by Simple Alert System
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1339.08 ▼6.30
Dashboard /wp-admin3.44 ▲0.0944.69 ▼20.23
Posts /wp-admin/edit.php3.55 ▲0.1945.68 ▲2.55
Add New Post /wp-admin/post-new.php6.04 ▲0.1578.49 ▼23.85
Media Library /wp-admin/upload.php3.36 ▲0.1338.01 ▲4.56
Simple Alert System /wp-admin/options-general.php?page=simple-alert-system3.3331.60

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 12 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

A check of browser resources used by Simple Alert System
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.02 ▼0.331.70 ▼0.0542.99 ▼1.38
Dashboard /wp-admin2,226 ▲525.82 ▲0.30103.29 ▲16.4378.04 ▲42.69
Posts /wp-admin/edit.php2,140 ▲402.71 ▲0.7640.60 ▼0.1636.21 ▼2.09
Add New Post /wp-admin/post-new.php1,714 ▲17723.23 ▲5.19664.00 ▲40.0837.01 ▼36.23
Media Library /wp-admin/upload.php1,437 ▲375.21 ▲1.03114.42 ▲20.8379.98 ▲37.40
Simple Alert System /wp-admin/options-general.php?page=simple-alert-system1,1462.5138.2143.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-alert-system/classes.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/simple-alert-system/alert.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/simple-alert-system/controls/sas-settings.php:1015
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-alert-system/classes.php:24

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=simple-alert-system
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=simple-alert-system 388 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

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
Attributes that require attention: You can take inspiration from this readme.txt

simple-alert-system/index.php 92% from 13 tests

"Simple Alert System" version 1.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-alert-system.php" instead of "index.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
No dangerous file extensions were detected1,389 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP562366920
CSS21225469

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity11.00
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.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

Using a strong compression for your PNG files is a great way to speed-up your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon.png5.66KB1.88KB▼ 66.83%
img/notification.png0.18KB0.27KB0.00%