78% super-simple-site-alert

Code Review | Super Simple Site Alert

WordPress plugin Super Simple Site Alert scored78%from 54 tests.

About plugin

  • Plugin page: super-simple-site...
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.0
  • WordPress version: 6.3.1
  • First release: May 23, 2022
  • Latest release: Nov 10, 2022
  • Number of updates: 9
  • Update frequency: every 19.2 days
  • Top authors: renderlogic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /620 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
Install script ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼5.35ms] Passed 4 tests

Server-side resources used by Super Simple Site Alert
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1943.59 ▼2.66
Dashboard /wp-admin3.41 ▲0.0750.60 ▼12.05
Posts /wp-admin/edit.php3.53 ▲0.1750.37 ▲2.83
Add New Post /wp-admin/post-new.php6.01 ▲0.1391.25 ▼9.51
Media Library /wp-admin/upload.php3.34 ▲0.1137.52 ▲4.06
Site Alert /wp-admin/admin.php?page=site-alert3.3734.61
Add/Edit /wp-admin/admin.php?page=site-alert-manage3.4236.94

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Super Simple Site Alert
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲19514.38 ▼0.247.54 ▲5.5345.96 ▲3.39
Dashboard /wp-admin2,261 ▲815.23 ▼0.44105.67 ▲9.8148.03 ▲8.67
Posts /wp-admin/edit.php2,175 ▲722.62 ▲0.5945.33 ▲7.5937.79 ▲1.67
Add New Post /wp-admin/post-new.php1,585 ▲5923.18 ▲0.35667.57 ▲72.3136.19 ▼18.44
Media Library /wp-admin/upload.php1,469 ▲664.77 ▲0.56107.69 ▲9.5240.44 ▼3.36
Site Alert /wp-admin/admin.php?page=site-alert7311.5210.6516.78
Add/Edit /wp-admin/admin.php?page=site-alert-manage9531.7010.1427.45

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=site-alert
    • > Error in wp-content/plugins/super-simple-site-alert/admin/partials/site-alert-admin-display.php+13
    Uncaught Error: Call to undefined function get_sites() in wp-content/plugins/super-simple-site-alert/admin/partials/site-alert-admin-display.php:13
    Stack trace:
    #0 wp-content/plugins/super-simple-site-alert/admin/class-site-alert-admin.php(49): require_once()
    #1 wp-includes/class-wp-hook.php(310): Site_Alert_Admin->site_alert_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=site-alert-manage
    • > Notice in wp-content/plugins/super-simple-site-alert/admin/partials/site-alert-admin-manage.php+208
    Undefined variable: priority_color_border
    • > GET request to /wp-admin/admin.php?page=site-alert-manage
    • > Notice in wp-content/plugins/super-simple-site-alert/admin/partials/site-alert-admin-manage.php+209
    Undefined variable: priority_color_bg
    • > GET request to /wp-admin/admin.php?page=site-alert-manage
    • > Notice in wp-content/plugins/super-simple-site-alert/admin/partials/site-alert-admin-manage.php+210
    Undefined variable: priority_color_text
    • > GET request to /wp-admin/admin.php?page=site-alert-manage
    • > Error in wp-content/plugins/super-simple-site-alert/admin/partials/site-alert-admin-manage.php+244
    Uncaught Error: Call to undefined function get_sites() in wp-content/plugins/super-simple-site-alert/admin/partials/site-alert-admin-manage.php:244
    Stack trace:
    #0 wp-content/plugins/super-simple-site-alert/admin/class-site-alert-admin.php(56): require_once()
    #1 wp-includes/class-wp-hook.php(310): Site_Alert_Admin->site_alert_manage()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

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
Please fix the following items
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/super-simple-site-alert/admin/partials/site-alert-admin-groups.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_blog_id() in wp-content/plugins/super-simple-site-alert/admin/partials/site-alert-admin-display.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_current_blog_id() in wp-content/plugins/super-simple-site-alert/public/partials/site-alert-public-display.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/super-simple-site-alert/admin/partials/site-alert-admin-manage.php:174

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: network, multisite, alert

super-simple-site-alert/site-alert.php 92% from 13 tests

The principal PHP file in "Super Simple Site Alert" v. 1.3.1 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("super-simple-site-alert.php" instead of "site-alert.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected5,049 lines of code in 62 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript304112022,603
PHP141703071,470
CSS1812777976

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity6.17
▷ Minimum class complexity1.00
▷ Maximum class complexity24.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods3088.24%
▷ Protected methods00.00%
▷ Private methods411.76%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/js/DataTables-1.10.24/images/sort_asc.png0.16KB0.25KB0.00%
admin/js/DataTables-1.10.24/images/sort_asc_disabled.png0.14KB0.25KB0.00%
admin/js/DataTables-1.10.24/images/sort_desc_disabled.png0.14KB0.25KB0.00%
admin/js/DataTables-1.10.24/images/sort_both.png0.20KB0.29KB0.00%
admin/js/DataTables-1.10.24/images/sort_desc.png0.15KB0.25KB0.00%