10% ace-twilio-for-woocommerce

Code Review | Ace Twilio For Woocommerce

WordPress plugin Ace Twilio For Woocommerce scored 10% from 54 tests.

About plugin

  • Plugin page: ace-twilio-for-wo...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.7
  • WordPress version: 5.9.2
  • First release: Jan 15, 2019
  • Latest release: Apr 9, 2021
  • Number of updates: 4
  • Update frequency: every 204.2 days
  • Top authors: acewebx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 567 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-includes/class-wp-hook.php+307
    call_user_func_array() expects parameter 1 to be a valid callback, function 'activate_ace_twilio_for_woocommerce ' not found or invalid function name

Server metrics [RAM: ▲0.18MB] [CPU: ▼291.21ms] Passed 4 tests

An overview of server-side resources used by Ace Twilio For Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.78 ▲0.2655.41 ▲5.16
Dashboard /wp-admin3.61 ▲0.2133.11 ▼0.90
Posts /wp-admin/edit.php3.84 ▲0.2039.78 ▲1.09
Add New Post /wp-admin/post-new.php7.08 ▲0.11102.22 ▼1,165.89
Media Library /wp-admin/upload.php3.49 ▲0.1926.81 ▲0.88

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 1,476 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Ace Twilio For Woocommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,922 ▲16816.23 ▲0.598.95 ▲3.192.20 ▼0.47
Dashboard /wp-admin2,910 ▲496.19 ▲0.05118.38 ▼15.76158.33 ▼2.50
Posts /wp-admin/edit.php2,706 ▲183.24 ▲0.0065.78 ▲3.67144.51 ▲7.86
Add New Post /wp-admin/post-new.php1,710 ▼121.13 ▼0.58436.95 ▼19.31183.99 ▲26.14
Media Library /wp-admin/upload.php1,714 ▲165.51 ▲0.05154.02 ▲2.02196.29 ▲4.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin cannot be uninstalled
    • > Warning in wp-includes/class-wp-hook.php+307
    call_user_func_array() expects parameter 1 to be a valid callback, function 'deactivate_ace_twilio_for_woocommerce ' not found or invalid function name

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1409× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/ace-twilio-for-woocommerce/public/twilio/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/SyncMap/SyncMapPermissionContext.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceResource' not found in wp-content/plugins/ace-twilio-for-woocommerce/public/twilio/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/TaskQueueInstance.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Exceptions\\TwilioException' not found in wp-content/plugins/ace-twilio-for-woocommerce/public/twilio/vendor/twilio/sdk/Twilio/Exceptions/DeserializeException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceResource' not found in wp-content/plugins/ace-twilio-for-woocommerce/public/twilio/vendor/twilio/sdk/Twilio/Rest/Chat/V2/Service/Channel/InviteInstance.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/ace-twilio-for-woocommerce/public/twilio/vendor/twilio/sdk/Twilio/Rest/Sync/V1/Service/Document/DocumentPermissionList.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/ace-twilio-for-woocommerce/public/twilio/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/VoipList.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\InstanceContext' not found in wp-content/plugins/ace-twilio-for-woocommerce/public/twilio/vendor/twilio/sdk/Twilio/Rest/IpMessaging/V2/Service/Channel/MemberContext.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\ListResource' not found in wp-content/plugins/ace-twilio-for-woocommerce/public/twilio/vendor/twilio/sdk/Twilio/Rest/IpMessaging/V1/Service/Channel/MessageList.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Page' not found in wp-content/plugins/ace-twilio-for-woocommerce/public/twilio/vendor/twilio/sdk/Twilio/Rest/Api/V2010/Account/AvailablePhoneNumberCountry/MobilePage.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Twilio\\Page' not found in wp-content/plugins/ace-twilio-for-woocommerce/public/twilio/vendor/twilio/sdk/Twilio/Rest/Taskrouter/V1/Workspace/Task/ReservationPage.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: sms

ace-twilio-for-woocommerce/ace-twilio-for-woocommerce .php 92% from 13 tests

The primary PHP file in "Ace Twilio For Woocommerce" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ace-twilio-for-woocommerce.php" instead of "ace-twilio-for-woocommerce .php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin74,368 lines of code in 1,467 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,45920,33182,80674,225
JSON30081
CSS22847
Dockerfile1309
JavaScript24546

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity2.71
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.32
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces157
Interfaces2
Traits0
Classes1,809
▷ Abstract classes21011.61%
▷ Concrete classes1,59988.39%
▷ Final classes00.00%
Methods9,866
▷ Static methods3853.90%
▷ Public methods8,87689.97%
▷ Protected methods9799.92%
▷ Private methods110.11%
Functions89
▷ Named functions44.49%
▷ Anonymous functions8595.51%
Constants8
▷ Global constants00.00%
▷ Class constants8100.00%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected