62% sms-alert

Code Review | SMS Alert Order Notifications - WooCommerce

WordPress plugin SMS Alert Order Notifications - WooCommerce scored62%from 54 tests.

About plugin

  • Plugin page: sms-alert
  • Plugin version: 3.6.8
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 18, 2016
  • Latest release: Nov 9, 2023
  • Number of updates: 702
  • Update frequency: every 3.6 days
  • Top authors: cozyvision1 (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

5,000+ active /202,218 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲6.23MB] [CPU: ▲32.84ms] 75% from 4 tests

Server-side resources used by SMS Alert Order Notifications - WooCommerce
It is recommended to improve the following
  • Extra RAM: Extra memory usage should kept under 5MB (currently 6.23MB on /wp-admin/admin.php?page=ab-cart)
PageMemory (MB)CPU Time (ms)
Home /9.72 ▲6.2577.34 ▲39.62
Dashboard /wp-admin9.58 ▲6.2383.06 ▲22.24
Posts /wp-admin/edit.php9.63 ▲6.2794.02 ▲44.13
Add New Post /wp-admin/post-new.php12.13 ▲6.24136.54 ▲25.38
Media Library /wp-admin/upload.php9.44 ▲6.2195.12 ▲61.28
SMS Alert /wp-admin/edit.php?post_type=event&page=sms-alert9.2865.73
Booking Calendar /wp-admin/admin.php?page=booking-reminder9.3966.28
SMS Alert /wp-admin/edit.php?post_type=download&page=sms-alert9.2859.87
SMS Alert /wp-admin/admin.php?page=sms-alert9.5171.62
Abandoned Carts /wp-admin/admin.php?page=ab-cart-reports9.4169.32
SMS Alert /wp-admin/options-general.php?page=sms-alert9.5171.32
Abandoned Carts /wp-admin/admin.php?page=ab-cart9.3966.64

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 180 new files
Database: 3 new tables, 10 new options
New tables
wp_smsalert_renewal_reminders
wp_smsalert_booking_reminder
wp_sa_captured_wc_fields
New WordPress options
widget_smsalert_widget
smsalert_activation_date
can_compress_scripts
recovery_mode_email_last_sent
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
smsalert_upgrade_settings
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for SMS Alert Order Notifications - WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7514.77 ▲0.431.73 ▲0.1836.02 ▼3.83
Dashboard /wp-admin2,224 ▲475.88 ▲0.2099.26 ▲10.7243.59 ▼0.14
Posts /wp-admin/edit.php2,133 ▲332.13 ▲0.1045.20 ▲4.6135.60 ▼0.63
Add New Post /wp-admin/post-new.php1,689 ▲16323.21 ▼0.36697.14 ▲29.1639.03 ▼16.44
Media Library /wp-admin/upload.php1,429 ▲264.32 ▲0.16112.62 ▲10.4448.06 ▲1.84
SMS Alert /wp-admin/edit.php?post_type=event&page=sms-alert280.410.084.36
Booking Calendar /wp-admin/admin.php?page=booking-reminder7001.126.8517.40
SMS Alert /wp-admin/edit.php?post_type=download&page=sms-alert280.410.073.28
SMS Alert /wp-admin/admin.php?page=sms-alert2,3462.4752.5731.47
Abandoned Carts /wp-admin/admin.php?page=ab-cart-reports1,1252.5838.6930.83
SMS Alert /wp-admin/options-general.php?page=sms-alert2,3492.4750.4828.48
Abandoned Carts /wp-admin/admin.php?page=ab-cart7001.126.7320.07

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_smsalert_booking_reminder
    • wp_smsalert_renewal_reminders
  • Zombie WordPress options detected upon uninstall: 10 options
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • smsalert_upgrade_settings
    • widget_smsalert_widget
    • widget_theysaidso_widget
    • widget_recent-posts
    • smsalert_activation_date
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=booking-reminder
    • > Error in wp-content/plugins/sms-alert/helper/wc-integration.php+1383
    Uncaught Error: Class 'SA_Admin_Reminder_Table' not found in wp-content/plugins/sms-alert/helper/wc-integration.php:1383
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): SAReminderlist::display_page()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=ab-cart
    • > Error in wp-content/plugins/sms-alert/helper/class-abandonedcart.php+508
    Uncaught Error: Class 'SA_Admin_Table' not found in wp-content/plugins/sms-alert/helper/class-abandonedcart.php:508
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): SA_Cart_Admin::display_page()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-admin/admin.php(259): do_action()
    #4 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 67× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sms-alert/template/emails/mismatch-template.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sms-alert/helper/class-elementorwidget.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_thickbox() in wp-content/plugins/sms-alert/views/edd-template.php:12
    • > PHP Notice
      Undefined variable: templates in wp-content/plugins/sms-alert/views/booking-reminder-template.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/sms-alert/template/emails/smsalert-low-bal.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'FluentForm' not found in wp-content/plugins/sms-alert/views/fluent_admin_template.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_head() in wp-content/plugins/sms-alert/template/reset-password-template.php:20
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/sms-alert/classes/setting-options.php on line 13
    • > PHP Notice
      Undefined variable: templates in wp-content/plugins/sms-alert/views/notifyme-template.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/sms-alert/helper/class-divimodule.php:14

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=event&page=sms-alert
    • > Network (severe)
    wp-admin/edit.php?post_type=event&page=sms-alert - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/edit.php?post_type=download&page=sms-alert
    • > Network (severe)
    wp-admin/edit.php?post_type=download&page=sms-alert - Failed to load resource: the server responded with a status of 403 (Forbidden)
    • > GET request to /wp-admin/admin.php?page=sms-alert
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=sms-alert - Access to XMLHttpRequest at 'http://www.smsalert.co.in/api/countrylist.json' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=sms-alert
    • > Network (severe)
    http://www.smsalert.co.in/api/countrylist.json - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/admin.php?page=ab-cart-reports
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=ab-cart-reports - Access to XMLHttpRequest at 'http://www.smsalert.co.in/api/countrylist.json' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/options-general.php?page=sms-alert
    • > Javascript (severe) in unknown
    /wp-admin/options-general.php?page=sms-alert - Access to XMLHttpRequest at 'http://www.smsalert.co.in/api/countrylist.json' from origin '' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: woocommerce sms integration, order sms, sms plugin, order notification, mobile verification

sms-alert/SMSAlert-wc-order-sms.php 85% from 13 tests

Analyzing the main PHP file in "SMS Alert Order Notifications - WooCommerce" version 3.6.8
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("sms-alert.php" instead of "SMSAlert-wc-order-sms.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.6" instead of "2.0.0")

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 detected42,731 lines of code in 171 files:
LanguageFilesBlank linesComment linesLines of code
PHP1455,35514,53636,817
JavaScript183364515,796
CSS50088
JSON30030

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity29.69
▷ Minimum class complexity1.00
▷ Maximum class complexity275.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity71.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes127
▷ Abstract classes21.57%
▷ Concrete classes12598.43%
▷ Final classes00.00%
Methods1,569
▷ Static methods42427.02%
▷ Public methods1,51396.43%
▷ Protected methods483.06%
▷ Private methods80.51%
Functions56
▷ Named functions3155.36%
▷ Anonymous functions2544.64%
Constants110
▷ Global constants1513.64%
▷ Class constants9586.36%
▷ Public constants95100.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
5 PNG files occupy 0.26MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flags@2x.png170.28KB68.04KB▼ 60.04%
images/chosen-sprite@2x.png0.85KB0.83KB▼ 3.10%
images/chosen-sprite.png0.63KB0.88KB0.00%
images/flags.png69.20KB23.42KB▼ 66.16%
images/www.smsalert.co.in.png20.16KB8.06KB▼ 60.04%