78% twl-easy-call

Code Review | Easy Call With Twilio

WordPress plugin Easy Call With Twilio scored78%from 54 tests.

About plugin

  • Plugin page: twl-easy-call
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2015
  • Latest release: Apr 17, 2022
  • Number of updates: 26
  • Update frequency: every 91.8 days
  • Top authors: zonnix (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,354 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.22ms] Passed 4 tests

A check of server-side resources used by Easy Call With Twilio
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.33 ▼3.94
Dashboard /wp-admin3.38 ▲0.0851.37 ▼1.12
Posts /wp-admin/edit.php3.49 ▲0.1449.54 ▼0.51
Add New Post /wp-admin/post-new.php5.96 ▲0.0897.59 ▲0.68
Media Library /wp-admin/upload.php3.30 ▲0.0839.65 ▲1.13

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 92 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Call With Twilio
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲16414.38 ▲0.098.83 ▲6.4742.33 ▼2.59
Dashboard /wp-admin2,239 ▲395.88 ▼0.0299.47 ▼19.7938.97 ▼6.50
Posts /wp-admin/edit.php2,118 ▲182.06 ▲0.0039.70 ▲2.4735.46 ▼1.71
Add New Post /wp-admin/post-new.php1,555 ▲2923.27 ▲5.69642.74 ▼24.0350.36 ▼1.15
Media Library /wp-admin/upload.php1,412 ▲124.20 ▼0.0795.04 ▼11.8144.67 ▲0.63

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

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 | 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
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/twl-easy-call/lib/screen_for_machine.php
  • 68× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/twl-easy-call/lib/Twilio/Twilio/Rest/ConnectApps.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_Resource' not found in wp-content/plugins/twl-easy-call/lib/Twilio/Twilio/ListResource.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/twl-easy-call/lib/Twilio/Twilio/Rest/IncomingPhoneNumber.php:88
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/twl-easy-call/lib/Twilio/Twilio/Rest/CredentialList.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/twl-easy-call/lib/Twilio/Twilio/Rest/SmsMessages.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/twl-easy-call/lib/Twilio/Twilio/Rest/Notification.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/twl-easy-call/lib/Twilio/Twilio/Rest/Participants.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_InstanceResource' not found in wp-content/plugins/twl-easy-call/lib/Twilio/Twilio/Rest/ConnectApp.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/twl-easy-call/lib/Twilio/Twilio/Rest/Applications.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Services_Twilio_ListResource' not found in wp-content/plugins/twl-easy-call/lib/Twilio/Twilio/Rest/Queues.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
7 plugin tags: call, twilio, click 2 call, click to call, voice call...

twl-easy-call/twilio.php 85% from 13 tests

The primary PHP file in "Easy Call With Twilio" version 1.1.0 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("twl-easy-call.php" instead of "twilio.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 286 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected2,269 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
PHP833481,4861,822
JavaScript32368443
CSS2004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity2.52
▷ Minimum class complexity1.00
▷ Maximum class complexity27.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes97
▷ Abstract classes44.12%
▷ Concrete classes9395.88%
▷ Final classes00.00%
Methods164
▷ Static methods159.15%
▷ Public methods14487.80%
▷ Protected methods1810.98%
▷ Private methods21.22%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/flags.png69.15KB23.62KB▼ 65.85%
img/twilio.png5.33KB3.10KB▼ 41.79%