10% sms-gateway

Code Review | SMS Gateway

WordPress plugin SMS Gateway scored10%from 54 tests.

About plugin

  • Plugin page: sms-gateway
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-4.8
  • WordPress version: 6.3.1
  • First release: Jul 23, 2017
  • Latest release: Jul 23, 2017
  • Number of updates: 18
  • Update frequency: every 0.2 days
  • Top authors: oruskade (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /717 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/sms-gateway/sms_gateway.php+48
    Use of undefined constant sms_sender_msg - assumed 'sms_sender_msg' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼0.15MB] [CPU: ▼18.93ms] Passed 4 tests

Server-side resources used by SMS Gateway
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0839.23 ▼3.31
Dashboard /wp-admin3.14 ▼0.1626.75 ▼25.11
Posts /wp-admin/edit.php3.28 ▼0.0832.95 ▼11.17
Add New Post /wp-admin/post-new.php5.52 ▼0.3771.75 ▼30.88
Media Library /wp-admin/upload.php3.23 ▼0.0025.66 ▼8.57

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 13 new files
Database: 2 new tables, 9 new options
New tables
wp_sms_sender_sent_msg
wp_sms_sender_msg
New WordPress options
can_compress_scripts
sms_sender_test
sms_sender_api_key
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
sms_sender_capabilities
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

SMS Gateway: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.29 ▼1.094.89 ▲3.1642.60 ▼1.41
Dashboard /wp-admin2,228 ▲464.89 ▼0.00112.97 ▲7.8843.31 ▲2.00
Posts /wp-admin/edit.php2,111 ▲192.01 ▼0.0434.90 ▼6.9031.00 ▼5.84
Add New Post /wp-admin/post-new.php1,533 ▼017.58 ▼5.46672.07 ▲4.4454.65 ▼6.82
Media Library /wp-admin/upload.php1,410 ▲224.21 ▲0.0394.93 ▼6.0141.60 ▼5.47

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Warning in wp-content/plugins/sms-gateway/uninstall.php+9
    Use of undefined constant sms_sender_msg - assumed 'sms_sender_msg' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sms_sender_check_api_key() in wp-content/plugins/sms-gateway/templates/options_send_sms.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sms_sender_check_api_key() in wp-content/plugins/sms-gateway/templates/options_sent_msgs.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sms_sender_check_api_key() in wp-content/plugins/sms-gateway/templates/options_general.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sms_sender_check_api_key() in wp-content/plugins/sms-gateway/templates/options_notifications.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sms-gateway/sms_gateway.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

sms-gateway/sms_gateway.php 85% from 13 tests

The main file in "SMS Gateway" v. 1.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:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("sms-gateway.php" instead of "sms_gateway.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 551 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin6,508 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PO File12,4193,2305,357
PHP62051796
JavaScript32012261
CSS11294

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
There were not PNG files found in your plugin