67% clicksendsms

Code Review | ClickSend SMS Woo Integration

WordPress plugin ClickSend SMS Woo Integration scored67%from 54 tests.

About plugin

  • Plugin page: clicksendsms
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Sep 13, 2022
  • Latest release: Aug 1, 2023
  • Number of updates: 12
  • Update frequency: every 31.3 days
  • Top authors: clicksend (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /780 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.52MB] [CPU: ▼3.49ms] Passed 4 tests

An overview of server-side resources used by ClickSend SMS Woo Integration
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5342.44 ▲1.95
Dashboard /wp-admin3.86 ▲0.5546.54 ▼0.30
Posts /wp-admin/edit.php3.91 ▲0.5551.92 ▲6.43
Add New Post /wp-admin/post-new.php6.40 ▲0.5184.30 ▼18.32
Media Library /wp-admin/upload.php3.72 ▲0.4936.37 ▲2.73
Activate ClickSend /wp-admin/admin.php?page=clicksend-sms3.7034.70
SMS Templates /wp-admin/admin.php?page=clicksend-sms&tab=sms-templates3.6932.42
SMS Automation /wp-admin/admin.php?page=clicksend-sms&tab=woo-status3.6832.28
Send Bulk SMS /wp-admin/admin.php?page=cs-send-bulk-sms3.6932.04

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 51 new files
Database: 2 new tables, 7 new options
New tables
wp_cwi_sms_logs
wp_cwi_sms_template
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
recovery_mode_email_last_sent
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by ClickSend SMS Woo Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲11913.23 ▼1.144.53 ▲2.5943.18 ▲6.09
Dashboard /wp-admin2,282 ▲1035.89 ▲1.01102.20 ▼8.1641.54 ▼2.20
Posts /wp-admin/edit.php2,168 ▲792.08 ▲0.0538.18 ▼2.4430.57 ▼4.37
Add New Post /wp-admin/post-new.php1,579 ▲3723.41 ▲5.03682.54 ▲68.5737.62 ▼18.15
Media Library /wp-admin/upload.php1,467 ▲794.43 ▲0.2399.90 ▲0.5444.56 ▲0.97
Activate ClickSend /wp-admin/admin.php?page=clicksend-sms1,0431.8927.7932.50
SMS Templates /wp-admin/admin.php?page=clicksend-sms&tab=sms-templates9701.8132.4932.86
SMS Automation /wp-admin/admin.php?page=clicksend-sms&tab=woo-status7701.598.5818.12
Send Bulk SMS /wp-admin/admin.php?page=cs-send-bulk-sms8341.7625.4622.60

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_cwi_sms_template
    • wp_cwi_sms_logs
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • recovery_mode_email_last_sent
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=clicksend-sms&tab=sms-templates
    • > POST request to /wp-admin/admin-ajax.php
    • > User notice in wp-includes/functions.php+5905
    Function wpdb::prepare was called incorrectly. The query argument of wpdb::prepare() must have a placeholder. Please see Debugging in WordPress for more information. (This message was added in version 3.9.0.)
    • > GET request to /wp-admin/admin.php?page=clicksend-sms&tab=woo-status
    • > Error in wp-content/plugins/clicksendsms/admin/modules/woo-integration/class-clicksend-woo-integration-admin-module.php+657
    Uncaught Error: Call to undefined function wc_get_order_statuses() in wp-content/plugins/clicksendsms/admin/modules/woo-integration/class-clicksend-woo-integration-admin-module.php:657
    Stack trace:
    #0 wp-includes/class-wp-hook.php(310): Clicksend_Woo_Integration_Admin_Module->tab_content_activate_api_key()
    #1 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #2 wp-includes/plugin.php(517): WP_Hook->do_action()
    #3 wp-content/plugins/clicksendsms/admin/modules/settings/partials/clicksend-woo-integration-admin-display.php(34): do_action()
    #4 wp-content/plugins/clicksendsms/admin/class-clicksend-woo-integration-admin.php(136): require_once('/var/www/wordpr...')
    #5 wp-includes/class-wp-hook.php(310): Clicksend_Woo_Integration_Admin->admin_page_html()
    #6 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #7 wp-includes/plugin.

SRP 50% 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 items
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/clicksendsms/admin/modules/sms-templates/partials/clicksend-partials-sms-templates.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/clicksendsms/admin/modules/settings/partials/clicksend-woo-integration-admin-display.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/clicksendsms/admin/modules/settings/partials/clicksend-partials-settings.php:43
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/clicksendsms/admin/modules/settings/partials/clicksend-partials-plugin-messege.php:21
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/clicksendsms/admin/modules/settings/partials/clicksend-woo-integration-admin-display.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/clicksendsms/admin/modules/woo-integration/partials/clicksend-partials-woo-status.php:30
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/clicksendsms/admin/modules/settings/partials/clicksend-woo-integration-admin-display.php on line 24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/clicksendsms/admin/modules/woo-integration/partials/clicksend-partials-woo-send-bulk-sms.php:30
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/clicksendsms/admin/modules/woo-integration/partials/clicksend-woo-sms-logs-display.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Plugin Activation Screen.), #2 (Single order template screen.), #3 (Manage Templates)
The official readme.txt might help

clicksendsms/clicksend-woo-integration.php 77% from 13 tests

This is the main PHP file of "ClickSend SMS Woo Integration" version 1.2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("clicksendsms.php" instead of "clicksend-woo-integration.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 292 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin4,223 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP272911,4482,888
JavaScript6105190724
CSS75742611

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.54
▷ Minimum class complexity1.00
▷ Maximum class complexity72.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods86
▷ Static methods1820.93%
▷ Public methods7890.70%
▷ Protected methods11.16%
▷ Private methods78.14%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants654.55%
▷ Class constants545.45%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 PNG files occupy 0.32MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png43.20KB17.65KB▼ 59.15%
assets/ss-dashboard.png51.30KB20.89KB▼ 59.28%
assets/banner-772x250.png149.06KB50.18KB▼ 66.34%
assets/ss-templates.png57.70KB24.05KB▼ 58.31%
assets/ss-single-order.png22.79KB10.41KB▼ 54.33%