68% support-chat

Code Review | Click to Chat App - Support All-in-One Floating Widget

WordPress plugin Click to Chat App - Support All-in-One Floating Widget scored68%from 54 tests.

About plugin

  • Plugin page: support-chat
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 10, 2021
  • Latest release: Nov 22, 2023
  • Number of updates: 12
  • Update frequency: every 79.7 days
  • Top authors: ninjateam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /2,013 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼0.77ms] Passed 4 tests

This is a short check of server-side resources used by Click to Chat App - Support All-in-One Floating Widget
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.03 ▲0.5647.90 ▲5.72
Dashboard /wp-admin3.48 ▲0.1745.45 ▼8.29
Posts /wp-admin/edit.php3.60 ▲0.2348.06 ▲0.56
Add New Post /wp-admin/post-new.php6.06 ▲0.1792.60 ▼1.07
Media Library /wp-admin/upload.php3.40 ▲0.1741.46 ▲8.25

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 11 new options
New WordPress options
wpsaio_button_image
wpsaio_enable_plugin
widget_theysaidso_widget
wpsaio_widget_position
wpsaio_style
can_compress_scripts
wpsaio_tooltip
theysaidso_admin_options
db_upgraded
widget_recent-comments
...

Browser metrics Passed 4 tests

Checking browser requirements for Click to Chat App - Support All-in-One Floating Widget
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,030 ▲26813.81 ▼0.909.66 ▲7.9236.75 ▼9.74
Dashboard /wp-admin2,238 ▲585.55 ▼0.1294.96 ▼1.3887.94 ▲39.33
Posts /wp-admin/edit.php2,149 ▲491.99 ▲0.0138.63 ▼3.5034.39 ▼4.32
Add New Post /wp-admin/post-new.php1,721 ▲19522.32 ▼0.76682.06 ▲53.9955.10 ▼10.61
Media Library /wp-admin/upload.php1,440 ▲374.16 ▼0.02110.83 ▲14.2779.72 ▲38.51

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method WpSaioInit::deactivate() should not be called statically
  • This plugin does not fully uninstall, leaving 11 options in the database
    • theysaidso_admin_options
    • wpsaio_enable_plugin
    • wpsaio_widget_position
    • wpsaio_button_image
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • wpsaio_tooltip
    • wpsaio_style
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/support-chat/views/admin/app/remove-input-btn.php
  • 8× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_errors() in wp-content/plugins/support-chat/views/admin/settings.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WpSaioMobileDetect' not found in wp-content/plugins/support-chat/views/home/main.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WpSaioMobileDetect' not found in wp-content/plugins/support-chat/views/home/button.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/support-chat/wp-support-all-in-one.php:11
    • > PHP Warning
      Use of undefined constant WP_SAIO_URL - assumed 'WP_SAIO_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/support-chat/views/admin/app/remove-input-btn.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/support-chat/views/admin/design-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/support-chat/views/admin/app/add-input.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/support-chat/views/admin/display-settings.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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (Available apps in floating button) image not found
You can look at the official readme.txt

support-chat/wp-support-all-in-one.php 92% from 13 tests

The primary PHP file in "Click to Chat App - Support All-in-One Floating Widget" version 2.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("support-chat.php" instead of "wp-support-all-in-one.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
Success! There were no dangerous files found in this plugin3,462 lines of code in 42 files:
LanguageFilesBlank linesComment linesLines of code
PHP172647042,119
JavaScript45134629
SVG12217315
PO File27482199
CSS501178
Markdown15012
HTML10010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity29.00
▷ Minimum class complexity2.00
▷ Maximum class complexity134.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods85
▷ Static methods2630.59%
▷ Public methods8094.12%
▷ Protected methods33.53%
▷ Private methods22.35%
Functions5
▷ Named functions240.00%
▷ Anonymous functions360.00%
Constants14
▷ Global constants535.71%
▷ Class constants964.29%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/home/images/close-button-black.png1.14KB0.23KB▼ 80.10%
assets/home/images/close-button.png1.15KB0.23KB▼ 80.22%