77% order-sms-notification-woocommerce

Code Review | Order SMS Notification - WooCommerce

WordPress plugin Order SMS Notification - WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: order-sms-notific...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.0
  • WordPress version: 6.3.1
  • First release: Oct 20, 2014
  • Latest release: Sep 9, 2015
  • Number of updates: 4
  • Update frequency: every 81.0 days
  • Top authors: sabbir1991 (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

60+ active /12,154 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.20MB] [CPU: ▼4.92ms] Passed 4 tests

This is a short check of server-side resources used by Order SMS Notification - WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1535.65 ▼6.45
Dashboard /wp-admin3.58 ▲0.2747.54 ▼0.67
Posts /wp-admin/edit.php3.63 ▲0.2751.74 ▲6.24
Add New Post /wp-admin/post-new.php6.09 ▲0.2081.29 ▼18.79
Media Library /wp-admin/upload.php3.41 ▲0.1937.85 ▲6.94

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Order SMS Notification - WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,977 ▲23114.97 ▲0.571.68 ▼0.1040.75 ▲1.63
Dashboard /wp-admin2,386 ▲1956.67 ▲0.81133.21 ▲26.7542.19 ▲2.50
Posts /wp-admin/edit.php2,289 ▲2003.53 ▲1.4970.71 ▲34.5734.15 ▲1.18
Add New Post /wp-admin/post-new.php1,704 ▲16022.48 ▲4.26609.54 ▼29.7128.81 ▼28.33
Media Library /wp-admin/upload.php1,431 ▲434.35 ▲0.1582.47 ▼14.9441.37 ▲0.19

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • satosms_gateway
    • satosms_general
    • can_compress_scripts
    • satosms_message
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

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

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/oneapi-sample-app/push-log-viewer.php
  • 165× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/oneapi-sample-app/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/oneapi-sample-app/app.php on line 5
    • > PHP Fatal error
      Uncaught Error: Class 'infobip\\models\\AbstractObject' not found in wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/oneapi/models/two_factor_authentication/TfaIsVerifiedRequest.php:8
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/examples/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/examples/send_message_with_nli_and_wait_for_delivery_push.php on line 13
    • > PHP Fatal error
      Uncaught Error: Class 'infobip\\models\\AbstractObject' not found in wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/oneapi/models/Encoding.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'infobip\\models\\AbstractObject' not found in wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/oneapi/models/Network.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'infobip\\models\\AbstractObject' not found in wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/oneapi/models/two_factor_authentication/TfaVerifyPinResponse.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'infobip\\models\\AbstractObject' not found in wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/oneapi/models/Status.php:7
    • > PHP Warning
      require_once(wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/oneapi-sample-app/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/oneapi-sample-app/app.php on line 5
    • > PHP Warning
      require_once(../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/tests/hlr_conversion.php on line 5
    • > PHP Warning
      require_once(wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/oneapi-sample-app/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/order-sms-notification-woocommerce/lib/infobip/vendor/infobip/oneapi/oneapi-sample-app/app.php on line 5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 81% 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
These attributes need to be fixed:
  • Screenshots: Please a description for screenshot #4 in order-sms-notification-woocommerce/assets to your readme.txt
  • Tags: Too many tags (16 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Please add an image for screenshot #3 (SMS Settings panel)
You can look at the official readme.txt

order-sms-notification-woocommerce/sat-wc-order-sms.php 77% from 13 tests

This is the main PHP file of "Order SMS Notification - WooCommerce" version 2.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Git Repository: There should be no Git repositories present in your plugin
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 145 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("order-sms-notification-woocommerce.php" instead of "sat-wc-order-sms.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin5,090 lines of code in 154 files:
LanguageFilesBlank linesComment linesLines of code
PHP1361,4901,0194,122
Markdown81710377
HTML1380216
PO File18787214
JSON50084
CSS112355
JavaScript14316
Bourne Shell1006

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.02
▷ Minimum class complexity1.00
▷ Maximum class complexity46.00
Average method complexity2.15
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes90
▷ Abstract classes00.00%
▷ Concrete classes90100.00%
▷ Final classes00.00%
Methods236
▷ Static methods3414.41%
▷ Public methods22193.64%
▷ Protected methods104.24%
▷ Private methods52.12%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants27
▷ Global constants2177.78%
▷ Class constants622.22%
▷ Public constants6100.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 files were detected