79% sms-notifications-for-woocommerce

Code Review | SMS Notifications for WooCommerce

WordPress plugin SMS Notifications for WooCommerce scored79%from 54 tests.

About plugin

  • Plugin page: sms-notifications...
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2.2
  • WordPress version: 6.3.1
  • First release: Jan 11, 2017
  • Latest release: Jun 8, 2023
  • Number of updates: 48
  • Update frequency: every 48.6 days
  • Top authors: jakewer (87.5%)skillsup (14.58%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /7,883 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.17MB] [CPU: ▼24.29ms] Passed 4 tests

Analyzing server-side resources used by SMS Notifications for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.19 ▼4.23
Dashboard /wp-admin3.20 ▼0.1435.93 ▼33.13
Posts /wp-admin/edit.php3.27 ▼0.0836.40 ▼19.15
Add New Post /wp-admin/post-new.php5.44 ▼0.4466.85 ▼40.65
Media Library /wp-admin/upload.php3.21 ▼0.0236.13 ▲3.61

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: 1 new table, 7 new options
New tables
wp_suwcsms_cart_notifications
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
suwcsms_db_version
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by SMS Notifications for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,794 ▲4814.35 ▲0.421.59 ▼0.0942.47 ▼2.77
Dashboard /wp-admin2,194 ▲145.62 ▼0.1085.94 ▼4.1643.67 ▲4.36
Posts /wp-admin/edit.php2,105 ▲82.01 ▲0.0234.65 ▼1.2033.82 ▼3.16
Add New Post /wp-admin/post-new.php1,531 ▲523.01 ▼0.66678.89 ▲19.8971.70 ▲20.62
Media Library /wp-admin/upload.php1,402 ▲24.26 ▲0.11110.24 ▲7.9151.12 ▲6.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_suwcsms_cart_notifications
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • suwcsms_db_version
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4 in sms-notifications-for-woocommerce/assets to your readme.txt
The official readme.txt might help

sms-notifications-for-woocommerce/su-wc-sms-notifications.php 92% from 13 tests

The main PHP script in "SMS Notifications for WooCommerce" version 2.0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("sms-notifications-for-woocommerce.php" instead of "su-wc-sms-notifications.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected2,123 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3123772,123

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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%
Functions62
▷ Named functions62100.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
No PNG images were found in this plugin