10% shoutout-sms-for-woocommerce

Code Review | ShoutOUT SMS for WooCommerce

WordPress plugin ShoutOUT SMS for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: shoutout-sms-for-...
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.0.3
  • WordPress version: 6.3.1
  • First release: Jan 2, 2017
  • Latest release: Jan 24, 2019
  • Number of updates: 16
  • Update frequency: every 47.0 days
  • Top authors: shoutoutlabs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,228 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/shoutout-sms-for-woocommerce/includes/class-shoutout-sms-for-woo-activator.php+19
    Non-static method ShoutOUT_Sms_For_Woo_Activator::create_files() should not be called statically

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.69ms] Passed 4 tests

An overview of server-side resources used by ShoutOUT SMS for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0737.77 ▼4.38
Dashboard /wp-admin3.36 ▲0.0149.00 ▼13.56
Posts /wp-admin/edit.php3.41 ▲0.0552.78 ▼2.65
Add New Post /wp-admin/post-new.php5.94 ▲0.0595.15 ▼6.18
Media Library /wp-admin/upload.php3.28 ▲0.0539.44 ▼0.17

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 89 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by ShoutOUT SMS for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲3214.26 ▲0.061.74 ▼0.6341.16 ▼11.84
Dashboard /wp-admin2,195 ▲185.64 ▲0.0890.64 ▼2.3640.27 ▲2.17
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0239.39 ▲5.0434.30 ▼1.67
Add New Post /wp-admin/post-new.php1,547 ▲1323.36 ▼0.30644.46 ▼47.5269.40 ▲16.33
Media Library /wp-admin/upload.php1,400 ▼04.29 ▲0.03104.87 ▼12.7645.06 ▼6.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

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
Good news, no errors were detected

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
Please fix the following items
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/shoutout-sms-for-woocommerce/vendor/shoutoutlabs/shoutout-sdk/sample/putcontact.php
    • > /wp-content/plugins/shoutout-sms-for-woocommerce/vendor/shoutoutlabs/shoutout-sdk/sample/postmessage.php
    • > /wp-content/plugins/shoutout-sms-for-woocommerce/vendor/shoutoutlabs/shoutout-sdk/sample/postactivity.php
    • > /wp-content/plugins/shoutout-sms-for-woocommerce/vendor/shoutoutlabs/shoutout-sdk/sample/postcontacts.php
  • 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/shoutout-sms-for-woocommerce/vendor/shoutoutlabs/shoutout-sdk/test/Model/MessageResponseTest.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/shoutout-sms-for-woocommerce/admin/partials/shoutout-sms-for-woo-admin-display.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/shoutout-sms-for-woocommerce/vendor/shoutoutlabs/shoutout-sdk/test/Model/ActivityTest.php:55
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/shoutout-sms-for-woocommerce/vendor/shoutoutlabs/shoutout-sdk/test/Model/ResponseTest.php:55
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/shoutout-sms-for-woocommerce/vendor/shoutoutlabs/shoutout-sdk/test/Api/DefaultApiTest.php:57
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/shoutout-sms-for-woocommerce/vendor/shoutoutlabs/shoutout-sdk/test/Model/MessageTest.php:55
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/shoutout-sms-for-woocommerce/vendor/shoutoutlabs/shoutout-sdk/test/Model/ContactsTest.php:55
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/shoutout-sms-for-woocommerce/vendor/shoutoutlabs/shoutout-sdk/test/Model/MessageContentTest.php:55

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: woo, shoutout, send notifications, shoutout lite, order notifications...

shoutout-sms-for-woocommerce/shoutout-sms-for-woo.php 85% from 13 tests

"ShoutOUT SMS for WooCommerce" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("shoutout-sms-for-woocommerce.php" instead of "shoutout-sms-for-woo.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

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
Everything looks great! No dangerous files found in this plugin4,477 lines of code in 68 files:
LanguageFilesBlank linesComment linesLines of code
PHP531,1164,2544,068
Markdown91190250
JSON30098
Bourne Shell113831
XML11020
YAML10010

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity11.56
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes43
▷ Abstract classes00.00%
▷ Concrete classes43100.00%
▷ Final classes00.00%
Methods508
▷ Static methods10119.88%
▷ Public methods49898.03%
▷ Protected methods20.39%
▷ Private methods81.57%
Functions7
▷ Named functions457.14%
▷ Anonymous functions342.86%
Constants5
▷ Global constants480.00%
▷ Class constants120.00%
▷ Public constants1100.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
9 PNG files occupy 0.23MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png19.20KB8.09KB▼ 57.84%
assets/banner-1544x500.png68.56KB29.99KB▼ 56.26%
assets/banner-772x250.png28.84KB14.73KB▼ 48.94%
assets/icon-256x256.png5.99KB2.72KB▼ 54.59%
assets/screenshot-4.png21.66KB8.83KB▼ 59.22%