78% wp-whatsapp-chat

Code Review | Click To Chat App

WordPress plugin Click To Chat App scored78%from 54 tests.

About plugin

  • Plugin page: wp-whatsapp-chat
  • Plugin version: 7.1.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: May 28, 2017
  • Latest release: Nov 21, 2023
  • Number of updates: 373
  • Update frequency: every 6.4 days
  • Top authors: quadlayers (96.51%)alcaporal (3.22%)

Code review

54 tests

User reviews

552 reviews

Install metrics

200,000+ active /5,354,412 total downloads

Benchmarks

Plugin footprint 82% 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.74MB] [CPU: ▲0.75ms] 75% from 4 tests

Server-side resources used by Click To Chat App
Please fix the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 688.06ms on /wp-admin/admin.php?page=qlwapp_suggestions)
PageMemory (MB)CPU Time (ms)
Home /4.30 ▲0.8353.65 ▲8.73
Dashboard /wp-admin4.07 ▲0.7256.82 ▼5.10
Posts /wp-admin/edit.php4.24 ▲0.8860.80 ▲11.61
Add New Post /wp-admin/post-new.php6.61 ▲0.7190.10 ▼7.38
Media Library /wp-admin/upload.php3.95 ▲0.7139.68 ▲6.73
Scheme /wp-admin/admin.php?page=qlwapp_scheme4.0040.80
Settings /wp-admin/admin.php?page=qlwapp_settings3.9744.17
Welcome /wp-admin/admin.php?page=qlwapp3.9639.06
Premium /wp-admin/admin.php?page=qlwapp_premium3.9643.63
Button /wp-admin/admin.php?page=qlwapp_button4.2844.38
Display /wp-admin/admin.php?page=qlwapp_display4.0242.29
Suggestions /wp-admin/admin.php?page=qlwapp_suggestions4.50688.06
Contacts /wp-admin/admin.php?page=qlwapp_contacts4.3452.08
Box /wp-admin/admin.php?page=qlwapp_box4.0346.90

Server storage [IO: ▲0.86MB] [DB: ▲0.06MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 137 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Click To Chat App
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,976 ▲22914.69 ▲0.392.47 ▲0.8438.06 ▼7.20
Dashboard /wp-admin2,356 ▲1795.54 ▼0.1296.19 ▼5.5245.29 ▲0.46
Posts /wp-admin/edit.php2,160 ▲571.94 ▼0.0239.19 ▼1.3036.00 ▼1.94
Add New Post /wp-admin/post-new.php1,577 ▲5123.01 ▼0.38633.87 ▲24.0144.28 ▼7.08
Media Library /wp-admin/upload.php1,466 ▲664.18 ▲0.0097.74 ▲2.9541.21 ▼2.97
Scheme /wp-admin/admin.php?page=qlwapp_scheme2,1813.4093.6140.73
Settings /wp-admin/admin.php?page=qlwapp_settings1,2192.7350.0037.73
Welcome /wp-admin/admin.php?page=qlwapp1,0182.2732.5845.01
Premium /wp-admin/admin.php?page=qlwapp_premium1,0562.4230.0539.75
Button /wp-admin/admin.php?page=qlwapp_button4,0112.3133.6643.26
Display /wp-admin/admin.php?page=qlwapp_display1,5893.2464.2341.61
Suggestions /wp-admin/admin.php?page=qlwapp_suggestions2,0292.5538.5366.89
Contacts /wp-admin/admin.php?page=qlwapp_contacts1,2493.7245.6280.46
Box /wp-admin/admin.php?page=qlwapp_box2,1948.95192.3286.40

Uninstaller [IO: ▲0.00MB] [DB: ▲0.06MB] 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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-whatsapp-chat/wp-whatsapp-chat.php
    • > /wp-content/plugins/wp-whatsapp-chat/uninstall.php
  • 53× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installer\\LibraryInstaller' not found in wp-content/plugins/wp-whatsapp-chat/vendor/automattic/jetpack-composer-plugin/src/class-manager.php:18
    • > PHP Warning
      Use of undefined constant QLWAPP_PLUGIN_DIR - assumed 'QLWAPP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-whatsapp-chat/lib/view/backend/pages/modals/template-scripts.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'QuadLayers\\QLWAPP\\Models\\Base' not found in wp-content/plugins/wp-whatsapp-chat/lib/models/class-woocommerce.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'QuadLayers\\QLWAPP\\Controllers\\Base' not found in wp-content/plugins/wp-whatsapp-chat/lib/controllers/class-woocommerce.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-whatsapp-chat/lib/view/backend/pages/welcome.php:5
    • > PHP Fatal error
      Trait 'QuadLayers\\WP_Notice_Plugin_Promote\\Traits\\PluginActions' not found in wp-content/plugins/wp-whatsapp-chat/jetpack_vendor/quadlayers/wp-notice-plugin-promote/src/PluginBySlugV2.php on line 20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function submit_button() in wp-content/plugins/wp-whatsapp-chat/lib/view/backend/pages/contacts.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Composer\\Plugin\\PluginInterface' not found in wp-content/plugins/wp-whatsapp-chat/vendor/automattic/jetpack-composer-plugin/src/class-plugin.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-whatsapp-chat/lib/view/backend/pages/modals/contact/panel-visibility.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'QuadLayers\\QLWAPP\\Models\\Base' not found in wp-content/plugins/wp-whatsapp-chat/lib/models/class-button.php:5

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

readme.txt 94% 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 need to be fixed:
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
You can take inspiration from this readme.txt

wp-whatsapp-chat/wp-whatsapp-chat.php Passed 13 tests

The primary PHP file in "Click To Chat App" version 7.1.9 is used by WordPress to initiate all plugin functionality
98 characters long description:
Social Chat allows your visitors to contact you or your team through WhatsApp with a single click.

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
Everything looks great! No dangerous files found in this plugin7,238 lines of code in 116 files:
LanguageFilesBlank linesComment linesLines of code
PHP949361,7695,609
Markdown112620724
JSON100463
CSS3660354
JavaScript591457
XML10025
SVG1006

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 problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity12.49
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity2.99
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces14
Interfaces0
Traits3
Classes46
▷ Abstract classes00.00%
▷ Concrete classes46100.00%
▷ Final classes12.17%
Methods271
▷ Static methods6323.25%
▷ Public methods23586.72%
▷ Protected methods00.00%
▷ Private methods3613.28%
Functions24
▷ Named functions729.17%
▷ Anonymous functions1770.83%
Constants30
▷ Global constants30100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.16MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/backend/img/box1.png89.13KB23.93KB▼ 73.15%
assets/backend/img/box2.png53.77KB14.44KB▼ 73.14%
assets/backend/img/icon.png19.44KB3.27KB▼ 83.20%