71% click-to-chat-whatso

Code Review | Whatso - WhatsApp Abandoned Cart Recovery for WooCommerce - Order Success Notifications - Click to Chat

WordPress plugin Whatso - WhatsApp Abandoned Cart Recovery for WooCommerce - Order Success Notifications - Click to Chat scored 71% from 54 tests.

About plugin

  • Plugin page: click-to-chat-whatso
  • Plugin version: 4.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9.2
  • WordPress version: 5.8.1
  • First release: Jul 28, 2021
  • Latest release: Mar 12, 2022
  • Number of updates: 91
  • Update frequency: every 2.5 days
  • Top authors: whatso (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active / 1,433 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.79MB] [CPU: ▼180.44ms] Passed 4 tests

This is a short check of server-side resources used by Whatso - WhatsApp Abandoned Cart Recovery for WooCommerce - Order Success Notifications - Click to Chat
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.7032.87 ▲7.77
Dashboard /wp-admin3.91 ▲0.8437.44 ▼6.81
Posts /wp-admin/edit.php3.95 ▲0.8339.56 ▲1.44
Add New Post /wp-admin/post-new.php6.44 ▲1.0070.07 ▼717.13
Media Library /wp-admin/upload.php3.80 ▲0.7928.97 ▲0.73
/wp-admin/admin.php?page=whatso_settings3.8627.27
/wp-admin/admin.php?page=whatso_floating_quick_setup3.9229.82
Settings /wp-admin/admin.php?page=whatso_admin_settings3.8228.62
/wp-admin/admin.php?page=whatso_ac_setup13.8229.63
Click to Chat /wp-admin/admin.php?page=whatso_floating_ctc_setup3.8626.49
/wp-admin/edit.php?post_type=whatso_accounts3.8329.53
Order Notification Setup /wp-admin/admin.php?page=whatso_notifications_setup3.8227.93
/wp-admin/admin.php?page=whatso_floating_widget3.8730.41
/wp-admin/admin.php?page=whatso_ac_dashboard3.7427.85
/wp-admin/admin.php?page=whatso_woocommerce_button3.8729.43

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 90 new files
Database: 2 new tables, 3 new options
New tables
wp_whatso_order_notification
wp_whatso_abandoned_cart
New WordPress options
ac_counter
whatso_user_settings
whatso_settings

Browser metrics Passed 4 tests

Whatso - WhatsApp Abandoned Cart Recovery for WooCommerce - Order Success Notifications - Click to Chat: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,905 ▲30415.95 ▼0.0211.22 ▲2.7476.30 ▼1.17
Dashboard /wp-admin2,988 ▲896.12 ▼0.04115.21 ▼31.24176.89 ▼1.32
Posts /wp-admin/edit.php2,801 ▲583.11 ▼0.1266.23 ▲0.68124.45 ▼18.80
Add New Post /wp-admin/post-new.php3,858 ▲4319.13 ▼0.04437.28 ▲26.65166.90 ▲4.42
Media Library /wp-admin/upload.php1,809 ▲605.65 ▲0.14123.51 ▼15.85192.25 ▲4.35
/wp-admin/admin.php?page=whatso_settings1,8936.72103.8080.09
/wp-admin/admin.php?page=whatso_floating_quick_setup1,9196.4493.3855.10
Settings /wp-admin/admin.php?page=whatso_admin_settings1,6935.9790.4457.48
/wp-admin/admin.php?page=whatso_ac_setup11,6876.0685.0536.70
Click to Chat /wp-admin/admin.php?page=whatso_floating_ctc_setup1,7086.0185.6282.82
/wp-admin/edit.php?post_type=whatso_accounts1,5162.9661.4398.46
Order Notification Setup /wp-admin/admin.php?page=whatso_notifications_setup1,6845.9584.5856.35
/wp-admin/admin.php?page=whatso_floating_widget1,5855.9384.8556.81
/wp-admin/admin.php?page=whatso_ac_dashboard1,1402.4750.22115.39
/wp-admin/admin.php?page=whatso_woocommerce_button1,7126.2985.2561.85

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 1 option
    • ac_counter

Smoke tests 25% 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=whatso_notifications_setup
    • > Notice in wp-content/plugins/click-to-chat-whatso/view/ac_setup1.php+4
    Trying to get property 'whatso_email' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=whatso_notifications_setup
    • > Notice in wp-content/plugins/click-to-chat-whatso/view/ac_setup1.php+148
    Undefined variable: whatso_username
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=whatso_notifications_setup
    • > Notice in wp-content/plugins/click-to-chat-whatso/view/ac_setup1.php+158
    Undefined variable: whatso_password

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
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/click-to-chat-whatso/view/floating_ctc_setup.php
  • 30× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WHATSO_Utils' not found in wp-content/plugins/click-to-chat-whatso/view/floating_widget_display_settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/click-to-chat-whatso/view/ac_dashboard.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WHATSO_Utils' not found in wp-content/plugins/click-to-chat-whatso/controller/ac_dashboard.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WHATSO_Utils' not found in wp-content/plugins/click-to-chat-whatso/controller/woocommerce_button.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function update_option() in wp-content/plugins/click-to-chat-whatso/controller/ac_dashboard_display.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WHATSO_Utils' not found in wp-content/plugins/click-to-chat-whatso/controller/ac_setup2.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/click-to-chat-whatso/view/ac_setup1.php:2
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/click-to-chat-whatso/view/abandoned_cart.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/click-to-chat-whatso/view/ac_dashboard.php:16
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/click-to-chat-whatso/view/abandoned_cart.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Screenshot #1 (Click to Chat - Whatso - Dashboard) image missing
Please take inspiration from this readme.txt

click-to-chat-whatso/whatso.php 77% from 13 tests

The principal PHP file in "Whatso - WhatsApp Abandoned Cart Recovery for WooCommerce - Order Success Notifications - Click to Chat" v. 4.1 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Plugin Name: Please don't use more than 70 characters for the plugin name (currently 103 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("click-to-chat-whatso.php" instead of "whatso.php")

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 detected11,425 lines of code in 66 files:
LanguageFilesBlank linesComment linesLines of code
PHP561,4264328,035
CSS53361052,128
JavaScript4269155853
PO File1172194409

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity55.00
▷ Minimum class complexity6.00
▷ Maximum class complexity352.00
Average method complexity8.44
▷ Minimum method complexity1.00
▷ Maximum method complexity99.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods89
▷ Static methods1516.85%
▷ Public methods8797.75%
▷ Protected methods00.00%
▷ Private methods22.25%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
8 PNG files occupy 0.09MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/jquery.minicolors.png67.02KB34.31KB▼ 48.80%
assets/images/avtar.png11.19KB4.14KB▼ 63.03%
assets/images/whatso-new-logo.png0.64KB0.62KB▼ 4.10%
assets/images/logo-white-small.png0.90KB1.24KB0.00%
assets/images/logo-group.png1.58KB1.41KB▼ 10.52%