68% tg-sms-notify

Code Review | TG Send SMS Notifications for Wordpress and WooCommerce Twilio

WordPress plugin TG Send SMS Notifications for Wordpress and WooCommerce Twilio scored68%from 54 tests.

About plugin

  • Plugin page: tg-sms-notify
  • Plugin version: 2.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.5.1
  • WordPress version: 6.3.1
  • First release: Aug 12, 2020
  • Latest release: Sep 8, 2020
  • Number of updates: 23
  • Update frequency: every 1.3 days
  • Top authors: burfbari (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /453 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.55MB] [CPU: ▼17.38ms] Passed 4 tests

An overview of server-side resources used by TG Send SMS Notifications for Wordpress and WooCommerce Twilio
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.64 ▼3.48
Dashboard /wp-admin3.44 ▲0.1352.44 ▲2.25
Posts /wp-admin/edit.php3.55 ▲0.1950.14 ▼2.79
Add New Post /wp-admin/post-new.php3.29 ▼2.6039.54 ▼65.51
Media Library /wp-admin/upload.php3.36 ▲0.1336.25 ▲3.28
TGSMS Notify Settings /wp-admin/options-general.php?page=tgsmsnotify-main-settings3.3335.99

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 1,819 new files
Database: no new tables, 7 new options
New WordPress options
Activated_Plugin
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for TG Send SMS Notifications for Wordpress and WooCommerce Twilio
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.24 ▼0.181.85 ▼0.2444.66 ▲5.01
Dashboard /wp-admin2,199 ▲225.70 ▲0.0289.28 ▼3.3538.42 ▼2.02
Posts /wp-admin/edit.php2,104 ▲42.01 ▲0.0541.35 ▲5.9535.14 ▼1.07
Add New Post /wp-admin/post-new.php1,538 ▲1018.34 ▼5.04608.86 ▼22.4176.62 ▲22.79
Media Library /wp-admin/upload.php1,407 ▲44.31 ▲0.1198.79 ▼6.2040.78 ▼6.25
TGSMS Notify Settings /wp-admin/options-general.php?page=tgsmsnotify-main-settings8352.0325.8426.94

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/tg-sms-notify/uninstall.php+8
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 7 options in the database
    • db_upgraded
    • Activated_Plugin
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/tg-sms-notify/tg-wp-sms-notify.php
  • 1781× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceResource' not found in wp-content/plugins/tg-sms-notify/includes/twilio-php-main/src/Twilio/Rest/Preview/Sync/Service/SyncMap/SyncMapPermissionInstance.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/tg-sms-notify/includes/twilio-php-main/src/Twilio/Rest/Serverless/V1/Service/BuildContext.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceResource' not found in wp-content/plugins/tg-sms-notify/includes/twilio-php-main/src/Twilio/Rest/Bulkexports/V1/ExportConfigurationInstance.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Options' not found in wp-content/plugins/tg-sms-notify/includes/twilio-php-main/src/Twilio/Rest/Api/V2010/Account/Usage/TriggerOptions.php:49
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/tg-sms-notify/includes/twilio-php-main/src/Twilio/Rest/Proxy/V1/Service/Session/Participant/MessageInteractionContext.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Page' not found in wp-content/plugins/tg-sms-notify/includes/twilio-php-main/src/Twilio/Rest/Preview/TrustedComms/CurrentCallPage.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Domain' not found in wp-content/plugins/tg-sms-notify/includes/twilio-php-main/src/Twilio/Rest/Video.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/tg-sms-notify/includes/twilio-php-main/src/Twilio/Rest/Wireless/V1/CommandList.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/tg-sms-notify/includes/twilio-php-main/src/Twilio/Rest/Preview/Understand/Assistant/StyleSheetContext.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/tg-sms-notify/includes/twilio-php-main/src/Twilio/Rest/Serverless/V1/Service/Environment/DeploymentContext.php:20

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

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

The main file in "TG Send SMS Notifications for Wordpress and WooCommerce Twilio" v. 2.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("tg-sms-notify.php" instead of "tg-wp-sms-notify.php")

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
Everything looks great! No dangerous files found in this plugin86,284 lines of code in 1,817 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,81225,236102,74686,151
Markdown225079
JSON10035
XML10011
Dockerfile1308

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.28
▷ Minimum class complexity1.00
▷ Maximum class complexity56.00
Average method complexity1.24
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces185
Interfaces2
Traits0
Classes2,265
▷ Abstract classes26111.52%
▷ Concrete classes2,00488.48%
▷ Final classes20.10%
Methods12,229
▷ Static methods4883.99%
▷ Public methods10,99789.93%
▷ Protected methods1,22510.02%
▷ Private methods70.06%
Functions136
▷ Named functions3928.68%
▷ Anonymous functions9771.32%
Constants16
▷ Global constants425.00%
▷ Class constants1275.00%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected