78% octopush-sms

Code Review | Ecommerce SMS Plugin

WordPress plugin Ecommerce SMS Plugin scored78%from 54 tests.

About plugin

  • Plugin page: octopush-sms
  • Plugin version: 1.7.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2016
  • Latest release: Dec 5, 2022
  • Number of updates: 35
  • Update frequency: every 71.7 days
  • Top authors: octopush (45.71%)m50 (42.86%)qsmidrees (17.14%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,021 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.78ms] Passed 4 tests

Server-side resources used by Ecommerce SMS Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.30 ▼9.64
Dashboard /wp-admin3.31 ▲0.0151.92 ▲7.58
Posts /wp-admin/edit.php3.37 ▲0.0151.70 ▼0.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.12 ▼8.90
Media Library /wp-admin/upload.php3.24 ▲0.0135.25 ▼0.56

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 60 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Ecommerce SMS Plugin
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.41 ▼0.111.77 ▲0.0339.19 ▲1.74
Dashboard /wp-admin2,209 ▲244.85 ▼0.9699.77 ▼2.1338.08 ▼6.74
Posts /wp-admin/edit.php2,086 ▼62.03 ▲0.0339.33 ▼2.7033.23 ▼3.71
Add New Post /wp-admin/post-new.php1,542 ▲918.43 ▼4.86591.70 ▼84.6355.83 ▲2.90
Media Library /wp-admin/upload.php1,385 ▼64.21 ▲0.1193.87 ▼12.3540.86 ▼6.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/octopush-sms/public/partials/octopush-sms-public-display.php
  • 22× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant WP_DEBUG - assumed 'WP_DEBUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/octopush-sms/includes/class-octopush-sms.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/octopush-sms/admin/API_SMS_PHP_Octopush/config.inc.php:119
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/octopush-sms/admin/API_SMS_PHP_Octopush/config.inc.php:119
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/octopush-sms/admin/class-octopush-sms-recipient-list.php on line 26
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/octopush-sms/admin/class-octopush-sms-recipient-list.php on line 26
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/octopush-sms/includes/class-octopush-sms-activator.php on line 13
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/octopush-sms/admin/class-octopush-sms-campaign-list.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/octopush-sms/admin/API_SMS_PHP_Octopush/config.inc.php:119
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/octopush-sms/includes/class-octopush-sms-activator.php on line 13
    • > begin class-octopush-sms

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)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: woocommerce, sms, woocomemerce sms, octopush

octopush-sms/octopush-sms.php 92% from 13 tests

The main file in "Ecommerce SMS Plugin" v. 1.7.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 236 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin7,360 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
PHP389081,8275,117
PO File25676831,461
JavaScript25695486
CSS2215179
LESS1309117

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity30.87
▷ Minimum class complexity1.00
▷ Maximum class complexity152.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes23
▷ Abstract classes14.35%
▷ Concrete classes2295.65%
▷ Final classes00.00%
Methods243
▷ Static methods5020.58%
▷ Public methods21488.07%
▷ Protected methods72.88%
▷ Private methods229.05%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants85
▷ Global constants8397.65%
▷ Class constants22.35%
▷ Public constants2100.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.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/information.png0.76KB0.83KB0.00%
public/img/octopush.png4.95KB1.66KB▼ 66.37%
admin/img/octopush.png4.95KB1.66KB▼ 66.37%
admin/img/no.png0.74KB0.74KB0.00%
admin/img/yes.png0.53KB0.58KB0.00%