73% chaty

Code Review | Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line Messenger, WeChat, Email, SMS, Call Button – Chaty

WordPress plugin Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line Messenger, WeChat, Email, SMS, Call Button – Chaty scored73%from 54 tests.

About plugin

  • Plugin page: chaty
  • Plugin version: 3.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-6.4
  • WordPress version: 6.3.1
  • First release: Aug 7, 2018
  • Latest release: Nov 20, 2023
  • Number of updates: 390
  • Update frequency: every 5.0 days
  • Top authors: galdub (84.62%)premiocommit (15.64%)

Code review

54 tests

User reviews

983 reviews

Install metrics

200,000+ active /2,717,707 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲1.02MB] [CPU: ▼1.15ms] 75% from 4 tests

This is a short check of server-side resources used by Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line Messenger, WeChat, Email, SMS, Call Button – Chaty
Please have a look at the following items
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,976.19ms on /wp-admin/admin.php?page=recommended-chaty-plugins)
PageMemory (MB)CPU Time (ms)
Home /4.32 ▲0.8539.98 ▲0.23
Dashboard /wp-admin4.44 ▲1.0950.95 ▼7.73
Posts /wp-admin/edit.php4.50 ▲1.1355.97 ▲5.29
Add New Post /wp-admin/post-new.php6.96 ▲1.0789.88 ▼2.39
Media Library /wp-admin/upload.php4.31 ▲1.0747.31 ▲14.71
Contact form leads /wp-admin/admin.php?page=chaty-contact-form-feed4.6159.79
+ Create New Widget /wp-admin/admin.php?page=chaty-upgrade4.1431.85
Recommended Plugins /wp-admin/admin.php?page=recommended-chaty-plugins4.701,976.19
Dashboard /wp-admin/admin.php?page=chaty-app4.3049.69
Widget Analytics /wp-admin/admin.php?page=widget-analytics4.6447.56
Upgrade to Pro ⭐️ /wp-admin/admin.php?page=chaty-app-upgrade4.6446.66

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 195 new files
Database: 1 new table, 21 new options
New tables
wp_chaty_contact_form_leads
New WordPress options
cht_social_whatsapp
cht_color
can_compress_scripts
chaty_show_review_box_after
cht_cta
cht_position
widget_icon
cht_devices
cht_numb_slug
db_upgraded
...

Browser metrics Passed 4 tests

An overview of browser requirements for Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line Messenger, WeChat, Email, SMS, Call Button – Chaty
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲9814.75 ▲0.031.61 ▼0.0837.22 ▼4.64
Dashboard /wp-admin2,253 ▲765.57 ▲0.0295.80 ▼5.8970.34 ▲21.42
Posts /wp-admin/edit.php2,167 ▲671.98 ▼0.0533.82 ▼8.4934.55 ▼5.07
Add New Post /wp-admin/post-new.php1,730 ▲20422.00 ▼1.37785.33 ▲108.9959.59 ▼8.84
Media Library /wp-admin/upload.php1,470 ▲704.18 ▼0.0695.29 ▼12.7973.65 ▲29.59
Contact form leads /wp-admin/admin.php?page=chaty-contact-form-feed9861.8234.0989.61
+ Create New Widget /wp-admin/admin.php?page=chaty-upgrade1,6971.7928.4464.21
Recommended Plugins /wp-admin/admin.php?page=recommended-chaty-plugins1,2132.0832.8046.13
Dashboard /wp-admin/admin.php?page=chaty-app1,7001.7725.8440.65
Widget Analytics /wp-admin/admin.php?page=widget-analytics1,0571.8027.0043.94
Upgrade to Pro ⭐️ /wp-admin/admin.php?page=chaty-app-upgrade5,0172.4559.3195.15

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_chaty_contact_form_leads
  • Zombie WordPress options were found after uninstall: 21 options
    • chaty_intro_popup
    • can_compress_scripts
    • cht_devices
    • cht_color
    • widget_theysaidso_widget
    • cht_numb_slug
    • chaty_show_review_box_after
    • chaty_show_upgrade_box_after
    • widget_icon
    • cht_social_phone
    • ...

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/chaty/views/admin/custom-tags.php:3

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

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

chaty/cht-icons.php 85% from 13 tests

The primary PHP file in "Floating Chat Widget: Contact Chat Icons, Telegram Chat, Line Messenger, WeChat, Email, SMS, Call Button – Chaty" version 3.1.8 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 148 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("chaty.php" instead of "cht-icons.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin43,347 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
JSON40016,359
PHP2896691610,884
JavaScript371,0369297,476
CSS164566596,689
SVG13541,133
Sass191273806

PHP code 50% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 144)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity69.43
▷ Minimum class complexity2.00
▷ Maximum class complexity326.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity144.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods75
▷ Static methods45.33%
▷ Public methods7194.67%
▷ Protected methods11.33%
▷ Private methods34.00%
Functions10
▷ Named functions880.00%
▷ Anonymous functions220.00%
Constants10
▷ Global constants10100.00%
▷ Class constants00.00%
▷ Public constants00.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
46 compressed PNG files occupy 0.61MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/first-widget.png9.96KB4.33KB▼ 56.47%
admin/assets/images/basic-price-bg.png8.90KB9.55KB0.00%
admin/assets/images/pro-chat.png1.69KB1.73KB0.00%
admin/assets/images/move-icon.png0.53KB0.54KB0.00%
admin/assets/images/agent-image.png12.14KB12.21KB0.00%