10% tw-simple-click-call

Code Review | Twilio Simple Click Call

WordPress plugin Twilio Simple Click Call scored10%from 54 tests.

About plugin

  • Plugin page: tw-simple-click-call
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Aug 2, 2016
  • Latest release: Aug 23, 2016
  • Number of updates: 16
  • Update frequency: every 1.3 days
  • Top authors: rajvirk123 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,168 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/tw-simple-click-call/twilio.php+24
    Constant WP_DEBUG already defined

Server metrics [RAM: ▼1.96MB] [CPU: ▼54.34ms] Passed 4 tests

An overview of server-side resources used by Twilio Simple Click Call
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.83 ▼39.01
Dashboard /wp-admin2.05 ▼1.265.69 ▼47.39
Posts /wp-admin/edit.php2.05 ▼1.315.90 ▼40.28
Add New Post /wp-admin/post-new.php2.05 ▼3.845.47 ▼90.69
Media Library /wp-admin/upload.php2.05 ▼1.186.13 ▼30.25
Twilio Call /wp-admin/admin.php?page=twscc_edit_twilio_details2.055.90
Make Call /wp-admin/admin.php?page=twscc_make_call2.057.09
Logs /wp-admin/admin.php?page=twscc_logs2.056.49

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 284 new files
Database: 1 new table, 6 new options
New tables
wp_twilio_detail
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Twilio Simple Click Call
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,914 ▲12813.83 ▼0.738.12 ▲5.7242.27 ▼2.95
Dashboard /wp-admin2,234 ▲575.62 ▲0.0882.88 ▼18.6242.13 ▼1.14
Posts /wp-admin/edit.php2,139 ▲392.03 ▲0.0443.58 ▲5.8335.44 ▼0.14
Add New Post /wp-admin/post-new.php1,566 ▲3023.01 ▼0.14667.54 ▼17.6557.04 ▼12.59
Media Library /wp-admin/upload.php1,433 ▲334.15 ▼0.12103.66 ▼12.3046.00 ▼1.84
Twilio Call /wp-admin/admin.php?page=twscc_edit_twilio_details1,1122.0328.7337.80
Make Call /wp-admin/admin.php?page=twscc_make_call2,6683.7153.28104.10
Logs /wp-admin/admin.php?page=twscc_logs8732.0724.9229.69

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/tw-simple-click-call/twilio.php+24
    Constant WP_DEBUG already defined
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_twilio_detail
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

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
These server-side errors were triggered
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=twscc_logs
    • > Notice in wp-content/plugins/tw-simple-click-call/twilio.php+24
    Constant WP_DEBUG already defined
  • 27 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=twscc_logs
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/admin.php?page=twscc_make_call
    • > Notice in wp-content/plugins/tw-simple-click-call/includes/twilio_main.php+36
    Undefined variable: token
    • > GET request to /wp-admin/admin.php?page=twscc_make_call
    • > Notice in wp-content/plugins/tw-simple-click-call/includes/twilio_main.php+37
    Undefined variable: twilio_number

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 fix the following items
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/tw-simple-click-call/twilio-php/tests/Bootstrap.php
    • > /wp-content/plugins/tw-simple-click-call/twilio.php
    • > /wp-content/plugins/tw-simple-click-call/class/base.php
  • 172× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/tw-simple-click-call/twilio-php/Services/Twilio/Rest/Applications.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/tw-simple-click-call/twilio-php/tests/resources/ConnectAppsTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_PricingInstanceResource' not found in wp-content/plugins/tw-simple-click-call/twilio-php/Services/Twilio/Rest/Pricing/VoiceNumber.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_NextGenInstanceResource' not found in wp-content/plugins/tw-simple-click-call/twilio-php/Services/Twilio/MonitorInstanceResource.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/tw-simple-click-call/twilio-php/Services/Twilio/UsageResource.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_TaskRouterInstanceResource' not found in wp-content/plugins/tw-simple-click-call/twilio-php/Services/Twilio/Rest/TaskRouter/Task.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_TaskRouterInstanceResource' not found in wp-content/plugins/tw-simple-click-call/twilio-php/Services/Twilio/Rest/TaskRouter/WorkersStatistics.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/tw-simple-click-call/twilio-php/Services/Twilio/Rest/Recordings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_NextGenListResource' not found in wp-content/plugins/tw-simple-click-call/twilio-php/Services/Twilio/TaskRouterListResource.php:3
    • > PHP Warning
      require_once(Twilio.php): failed to open stream: No such file or directory in wp-content/plugins/tw-simple-click-call/twilio-php/tests/BuildQueryTest.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=twscc_edit_twilio_details
    • > Network (severe)
    wp-content/plugins/tw-simple-click-call/css/SinkinSans-600SemiBold.otf - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=twscc_make_call
    • > Network (severe)
    wp-content/plugins/tw-simple-click-call/css/SinkinSans-500Medium.otf - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=twscc_make_call
    • > Network (severe)
    wp-content/plugins/tw-simple-click-call/js/twilio-custom.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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 require attention:
  • Donate link: Please fix this invalid URI: ""
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt might help

tw-simple-click-call/twilio.php 85% from 13 tests

The main PHP script in "Twilio Simple Click Call" version 1.0.3 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("tw-simple-click-call.php" instead of "twilio.php")
  • Description: The description should be shorter than 140 characters (currently 297 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin11,865 lines of code in 237 files:
LanguageFilesBlank linesComment linesLines of code
PHP1851,0361,7905,930
HTML748602,075
CSS3347491,982
reStructuredText281,0081,344709
JavaScript45974529
Markdown31660350
make2369157
Python27214397
JSON10028
XML1007
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity2.08
▷ Minimum class complexity1.00
▷ Maximum class complexity28.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes202
▷ Abstract classes146.93%
▷ Concrete classes18893.07%
▷ Final classes00.00%
Methods469
▷ Static methods153.20%
▷ Public methods43392.32%
▷ Protected methods316.61%
▷ Private methods51.07%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 0.12MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/lorem.png1.44KB0.58KB▼ 59.44%
images/check_radio_sheet_new.png2.19KB1.10KB▼ 49.55%
images/check_radio_sheet.png4.53KB1.46KB▼ 67.78%
images/arrow.png2.95KB0.25KB▼ 91.65%
images/record.png1.25KB0.47KB▼ 62.49%