56% tikab-sms

Code Review | Tikab SMS

WordPress plugin Tikab SMS scored 56% from 54 tests.

About plugin

  • Plugin page: tikab-sms
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9
  • WordPress version: 5.9.2
  • First release: Apr 21, 2014
  • Latest release: Apr 21, 2014
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: mostafa.s1990 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,778 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼299.34ms] Passed 4 tests

Analyzing server-side resources used by Tikab SMS
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.1966.29 ▲9.91
Dashboard /wp-admin3.54 ▲0.1441.61 ▼38.14
Posts /wp-admin/edit.php3.77 ▲0.1345.53 ▲1.91
Add New Post /wp-admin/post-new.php7.01 ▲0.04101.55 ▼1,167.69
Media Library /wp-admin/upload.php3.42 ▲0.1333.11 ▲6.57
About /wp-admin/admin.php?page=tikab-sms/about3.3928.23
Send SMS /wp-admin/admin.php?page=tikab-sms/tikab-sms.php3.4430.87
Newsletter subscribers /wp-admin/admin.php?page=tikab-sms/subscribe3.5029.91
Posted /wp-admin/admin.php?page=tikab-sms/posted3.5027.22
Setting /wp-admin/admin.php?page=tikab-sms/setting3.3630.11

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 56 new files
Database: 3 new tables, 3 new options
New tables
wp_ts_subscribes_group
wp_ts_send
wp_ts_subscribes
New WordPress options
wp_sms_db_version
recovery_mode_email_last_sent
wp_sms_mcc

Browser metrics Passed 4 tests

Checking browser requirements for Tikab SMS
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,873 ▲11915.78 ▼0.195.72 ▼1.562.64 ▲0.09
Dashboard /wp-admin2,963 ▲1056.20 ▲0.03149.68 ▲15.71155.49 ▼11.58
Posts /wp-admin/edit.php2,762 ▲713.27 ▲0.0465.16 ▼4.29137.06 ▼43.34
Add New Post /wp-admin/post-new.php1,829 ▲7723.03 ▲1.32437.70 ▼25.74186.42 ▲27.82
Media Library /wp-admin/upload.php1,782 ▲845.58 ▲0.06150.87 ▲2.06212.56 ▲25.00
About /wp-admin/admin.php?page=tikab-sms/about1,0542.6353.5698.96
Send SMS /wp-admin/admin.php?page=tikab-sms/tikab-sms.php9092.1840.9184.90
Newsletter subscribers /wp-admin/admin.php?page=tikab-sms/subscribe1,3282.9865.41136.52
Posted /wp-admin/admin.php?page=tikab-sms/posted1,1932.7654.21106.20
Setting /wp-admin/admin.php?page=tikab-sms/setting1,1642.7583.46111.48

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 3 tables in the database
    • wp_ts_subscribes
    • wp_ts_send
    • wp_ts_subscribes_group
  • The uninstall procedure has failed, leaving 3 options in the database
    • wp_sms_mcc
    • wp_sms_db_version
    • recovery_mode_email_last_sent

Smoke tests 0% 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=tikab-sms/tikab-sms.php
    • > Error in wp-content/plugins/tikab-sms/includes/classes/tikab-sms.class.php+42
    Uncaught Error: Class 'SoapClient' not found in wp-content/plugins/tikab-sms/includes/classes/tikab-sms.class.php:42
    Stack trace:
    #0 wp-content/plugins/tikab-sms/includes/templates/settings/send-sms.php(48): Tikab_Webservice->get_credit()
    #1 wp-content/plugins/tikab-sms/tikab-sms.php(186): include_once('/var/www/wordpr...')
    #2 wp-includes/class-wp-hook.php(307): wp_send_sms_page()
    #3 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #4 wp-includes/plugin.php(474): WP_Hook->do_action()
    #5 wp-admin/admin.php(259): do_action()
    #6 {main}
    thrown
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tikab-sms/posted
    • > Notice in wp-content/plugins/tikab-sms/tikab-sms.php+199
    Undefined index: doaction
    • > GET request to /wp-admin/admin.php?page=tikab-sms/subscribe
    • > Notice in wp-content/plugins/tikab-sms/tikab-sms.php+267
    Undefined index: wp_subscribe_name
    • > GET request to /wp-admin/admin.php?page=tikab-sms/subscribe
    • > Notice in wp-content/plugins/tikab-sms/tikab-sms.php+268
    Undefined index: wp_subscribe_mobile
    • > GET request to /wp-admin/admin.php?page=tikab-sms/subscribe
    • > Notice in wp-content/plugins/tikab-sms/tikab-sms.php+269
    Undefined index: wpsms_group_name
    • > GET request to /wp-admin/admin.php?page=tikab-sms/subscribe
    • > Notice in wp-content/plugins/tikab-sms/includes/templates/settings/subscribes.php+39
    Undefined index: action
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=tikab-sms/setting
    • > Notice in wp-content/plugins/tikab-sms/includes/templates/settings/setting.php+7
    Undefined index: tab

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/tikab-sms/includes/templates/tikab-sms-tell-friend-head.php
    • > /wp-content/plugins/tikab-sms/includes/newsletter/activation.php
    • > /wp-content/plugins/tikab-sms/includes/newsletter/newsletter.php
  • 21× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tikab-sms/includes/templates/settings/setting.php:3
    • > PHP Notice
      Undefined index: tab in wp-content/plugins/tikab-sms/includes/templates/settings/newsletter.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tikab-sms/includes/templates/tikab-sms-wpcf7-form.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/tikab-sms/tikab-sms.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tikab-sms/includes/templates/settings/meta-box.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_rtl() in wp-content/plugins/tikab-sms/includes/templates/settings/web-service.php:12
    • > PHP Notice
      Undefined index: tab in wp-content/plugins/tikab-sms/includes/templates/settings/notification.php on line 31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tikab-sms/includes/templates/tikab-sms-widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/tikab-sms/includes/newsletter/form.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/tikab-sms/includes/templates/settings/about.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=tikab-sms/tikab-sms.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: Cannot read properties of null (reading 'value')" "TypeError: Cannot read properties of null (reading 'value')\n at checkSMSLength (/wp-content/plugins/tikab-sms/js/functions.js:99:49)\n at charLeft2 (/wp-admin/admin.php?page=tikab-sms%2Ftikab-sms.php:151:3)\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=tikab-sms%2Ftikab-sms.php:173:3)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/admin.php?page=tikab-sms/tikab-sms.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: Cannot read properties of null (reading 'value')

Optimizations

Plugin configuration 97% 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 to be fixed:
  • Screenshots: These screenshots require images: #1 (Screen shot (screenshot-1.png) in SMS Setting Page.), #2 (Screen shot (screenshot-2.png) in Webservice page.), #3 (Screen shot (screenshot-3.png) in Newslleter page.), #4 (Screen shot (screenshot-4.png) in Features page.), #5 (Screen shot (screenshot-5.png) in Notifications page.), #6 (Screen shot (screenshot-6.png) in Send SMS Page.), #7 (Screen shot (screenshot-7.png) in SMS Posted Page.), #8 (Screen shot (screenshot-8.png) in Subscribe list Page.), #9 (Screen shot (screenshot-9.png) in Dashboard right now.), #10 (Screen shot (screenshot-10.png) in SMS Subscribe widget.), #11 (Screen shot (screenshot-11.png) in Subscribe new-post.php.), #12 (Screen shot (screenshot-12.png) in Suggestion post in single.), #13 (Screen shot (screenshot-13.png) in Contact Form 7 page.)
Please take inspiration from this readme.txt

tikab-sms/tikab-sms.php Passed 13 tests

The main PHP file in "Tikab SMS" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
100 characters long description:
Send a SMS via WordPress, Subscribe for SMS newsletter and send an SMS to the subscriber newsletter.

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
No dangerous file extensions were detected8,877 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP258932,4757,382
PO File34951,135939
JavaScript29571422
CSS450134

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity86.56
▷ Minimum class complexity1.00
▷ Maximum class complexity388.00
Average method complexity8.73
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods177
▷ Static methods00.00%
▷ Public methods17196.61%
▷ Protected methods00.00%
▷ Private methods63.39%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants133.33%
▷ Class constants266.67%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
17 PNG files occupy 0.50MB with 0.26MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-5.png191.38KB83.75KB▼ 56.24%
images/close.png3.56KB2.26KB▼ 36.63%
screenshot-9.png9.40KB6.53KB▼ 30.56%
screenshot-4.png26.66KB12.57KB▼ 52.84%
images/sms.png3.25KB0.57KB▼ 82.41%