67% wp-sms

Code Review | WP SMS - Messaging & SMS Notification for WordPress, WooCommerce, GravityForms, etc

WordPress plugin WP SMS - Messaging & SMS Notification for WordPress, WooCommerce, GravityForms, etc scored67%from 54 tests.

About plugin

  • Plugin page: wp-sms
  • Plugin version: 6.4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.4
  • WordPress version: 6.3.1
  • First release: Mar 12, 2012
  • Latest release: Nov 19, 2023
  • Number of updates: 415
  • Update frequency: every 10.4 days
  • Top authors: mostafa.s1990 (100%)

Code review

54 tests

User reviews

95 reviews

Install metrics

9,000+ active /521,559 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.25MB] [CPU: ▼0.26ms] 75% from 4 tests

Server-side resources used by WP SMS - Messaging & SMS Notification for WordPress, WooCommerce, GravityForms, etc
Please have a look at the following items
  • CPU: The total CPU usage must kept under 500.00ms (currently 3,833.64ms on /wp-admin/admin.php?page=wp-sms-add-ons)
PageMemory (MB)CPU Time (ms)
Home /3.69 ▲0.2335.14 ▼6.98
Dashboard /wp-admin3.56 ▲0.2560.11 ▲11.03
Posts /wp-admin/edit.php3.67 ▲0.3149.65 ▲4.23
Add New Post /wp-admin/post-new.php6.18 ▲0.2984.67 ▼2.72
Media Library /wp-admin/upload.php3.47 ▲0.2435.63 ▲4.44
Add-Ons /wp-admin/admin.php?page=wp-sms-add-ons3.753,833.64

Server storage [IO: ▲3.63MB] [DB: ▲0.08MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 462 new files
Database: 5 new tables, 8 new options
New tables
wp_sms_subscribes_group
wp_sms_otp
wp_sms_send
wp_sms_subscribes
wp_sms_otp_attempts
New WordPress options
db_upgraded
wpsms_settings
widget_recent-posts
wp_sms_db_version
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WP SMS - Messaging & SMS Notification for WordPress, WooCommerce, GravityForms, etc
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,106 ▲34415.37 ▲1.025.15 ▲3.4637.41 ▼6.78
Dashboard /wp-admin2,420 ▲2396.97 ▲1.25153.38 ▲42.2246.16 ▲1.63
Posts /wp-admin/edit.php2,153 ▲531.94 ▼0.0638.97 ▼0.7235.79 ▼4.18
Add New Post /wp-admin/post-new.php6,420 ▲4,89127.95 ▲4.64926.77 ▲241.0738.52 ▼23.93
Media Library /wp-admin/upload.php1,456 ▲534.15 ▼0.0096.93 ▼1.8944.62 ▲1.96
Add-Ons /wp-admin/admin.php?page=wp-sms-add-ons1,2962.4235.05124.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Zombie tables were found after uninstall: 5 tables
    • wp_sms_subscribes
    • wp_sms_subscribes_group
    • wp_sms_send
    • wp_sms_otp
    • wp_sms_otp_attempts
  • This plugin does not fully uninstall, leaving 8 options in the database
    • widget_theysaidso_widget
    • wp_sms_db_version
    • widget_recent-comments
    • wpsms_settings
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-sms/includes/templates/admin/label-button.php
    • > /wp-content/plugins/wp-sms/includes/templates/admin/field-wc-status-repeater.php
  • 286× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_SMS\\Gateway' not found in wp-content/plugins/wp-sms/includes/gateways/class-wpsms-gateway-adspanel.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_SMS\\Gateway' not found in wp-content/plugins/wp-sms/includes/gateways/class-wpsms-gateway-nesssolution.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_SMS\\Gateway' not found in wp-content/plugins/wp-sms/includes/gateways/class-wpsms-gateway-adpdigital.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_SMS\\Gateway' not found in wp-content/plugins/wp-sms/includes/gateways/class-wpsms-gateway-ariaideh.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_SMS\\Gateway' not found in wp-content/plugins/wp-sms/includes/gateways/class-wpsms-gateway-mediana.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_SMS\\Gateway' not found in wp-content/plugins/wp-sms/includes/gateways/class-wpsms-gateway-sendappWhatsApp.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_SMS\\Gateway' not found in wp-content/plugins/wp-sms/includes/gateways/class-wpsms-gateway-shreesms.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_SMS\\Gateway' not found in wp-content/plugins/wp-sms/includes/gateways/class-wpsms-gateway-verimor.php:5
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/wp-sms/includes/templates/admin/field-wc-status-repeater.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_SMS\\Gateway' not found in wp-content/plugins/wp-sms/includes/gateways/class-wpsms-gateway-aradsms.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: Add a description for screenshot #16 in wp-sms/assets to your readme.txt
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
You can take inspiration from this readme.txt

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

This is the main PHP file of "WP SMS - Messaging & SMS Notification for WordPress, WooCommerce, GravityForms, etc" version 6.4.1, 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:
  • Domain Path: The domain path folder does not exist ("/languages")

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 plugin43,996 lines of code in 421 files:
LanguageFilesBlank linesComment linesLines of code
PHP3548,06912,78434,392
Sass26718353,817
JavaScript234372882,575
CSS11325352,107
JSON3001,040
SVG30043
XML10022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.57
▷ Minimum class complexity1.00
▷ Maximum class complexity389.00
Average method complexity3.77
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces23
Interfaces0
Traits0
Classes332
▷ Abstract classes41.20%
▷ Concrete classes32898.80%
▷ Final classes30.91%
Methods1,487
▷ Static methods1006.72%
▷ Public methods1,38393.01%
▷ Protected methods181.21%
▷ Private methods865.78%
Functions53
▷ Named functions2037.74%
▷ Anonymous functions3362.26%
Constants16
▷ Global constants850.00%
▷ Class constants850.00%
▷ Public constants8100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
33 PNG files occupy 0.61MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/icons/success-sms.png1.16KB0.62KB▼ 46.30%
assets/images/logo-250.png19.69KB8.08KB▼ 58.99%
assets/images/icons/dark-lock.png0.30KB0.29KB▼ 2.28%
assets/images/icons/send-icon.png0.70KB0.43KB▼ 37.64%
assets/images/icons/next-step-outline.png1.05KB0.72KB▼ 31.54%