67% kaira-site-chat

Code Review | Site Chat - Website Chat & trusted support for your WordPress site and WooCommerce store.

WordPress plugin Site Chat - Website Chat & trusted support for your WordPress site and WooCommerce store. scored67%from 54 tests.

About plugin

  • Plugin page: kaira-site-chat
  • Plugin version: 1.1.11
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 5, 2022
  • Latest release: Jul 5, 2023
  • Number of updates: 9
  • Update frequency: every 50.7 days
  • Top authors: Kaira (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /798 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲5.02MB] [CPU: ▲25.82ms] 75% from 4 tests

Server-side resources used by Site Chat - Website Chat & trusted support for your WordPress site and WooCommerce store.
It is recommended to improve the following
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 5.02MB on /wp-admin/options-general.php?page=kairasc-settings)
PageMemory (MB)CPU Time (ms)
Home /8.87 ▲5.4167.60 ▲26.84
Dashboard /wp-admin8.89 ▲5.5972.43 ▲21.06
Posts /wp-admin/edit.php8.90 ▲5.5477.84 ▲29.25
Add New Post /wp-admin/post-new.php9.44 ▲3.56115.44 ▲26.12
Media Library /wp-admin/upload.php8.89 ▲5.6775.15 ▲35.89
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius8.8963.49
WhatsApp Settings /wp-admin/options-general.php?page=kairasc-settings8.9070.29

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 203 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
db_upgraded
fs_debug_mode
theysaidso_admin_options
fs_active_plugins
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
fs_accounts

Browser metrics Passed 4 tests

A check of browser resources used by Site Chat - Website Chat & trusted support for your WordPress site and WooCommerce store.
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,289 ▲50316.45 ▲2.0647.19 ▲45.3118.32 ▼30.07
Dashboard /wp-admin2,317 ▲1145.82 ▼0.08106.15 ▲5.7152.97 ▲11.49
Posts /wp-admin/edit.php2,203 ▲1032.15 ▲0.1836.45 ▼3.0145.58 ▲9.29
Add New Post /wp-admin/post-new.php1,610 ▲6323.30 ▼0.11657.25 ▼44.0237.05 ▼16.88
Media Library /wp-admin/upload.php1,499 ▲964.21 ▼0.0499.45 ▼5.4659.01 ▲12.83
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius1,0931.7225.9930.50
WhatsApp Settings /wp-admin/options-general.php?page=kairasc-settings1,1715.96132.87102.18

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/kaira-site-chat/freemius/includes/class-freemius.php+8486
    Undefined property: stdClass::$plugins
  • This plugin does not fully uninstall, leaving 9 options in the database
    • can_compress_scripts
    • fs_accounts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • fs_debug_mode
    • widget_theysaidso_widget
    • widget_recent-posts
    • fs_active_plugins

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kaira-site-chat/classes/class-admin-settings.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=kairasc-settings
    • > Javascript (severe) in unknown
    /wp-content/plugins/kaira-site-chat/dist/settings.js?ver=1.1.11 53698:14 Uncaught TypeError: Cannot read properties of null (reading 'addEventListener')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: whatsapp, whatsapp chat, whatsapp support, site chat

kaira-site-chat/kaira-site-chat.php 92% from 13 tests

The main PHP script in "Site Chat - Website Chat & trusted support for your WordPress site and WooCommerce store." version 1.1.11 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/lang/")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected97,937 lines of code in 149 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript99,7728,75760,856
PHP1218,02917,37833,788
CSS1970453,293

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity
Average complexity per logical line of code0.63
Average class complexity88.35
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.53
▷ Minimum method complexity1.00
▷ Maximum method complexity94.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes23.92%
▷ Concrete classes4996.08%
▷ Final classes00.00%
Methods1,290
▷ Static methods19815.35%
▷ Public methods90069.77%
▷ Protected methods171.32%
▷ Private methods37328.91%
Functions107
▷ Named functions10093.46%
▷ Anonymous functions76.54%
Constants148
▷ Global constants10168.24%
▷ Class constants4731.76%
▷ Public constants47100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
11 PNG files occupy 0.56MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/bc3c126497eac9310d06.png29.24KB13.96KB▼ 52.25%
dist/b4d5feb0e8a6daa8651f.png234.41KB116.32KB▼ 50.38%
dist/28dc51e2bf70ca0edf72.png13.38KB6.99KB▼ 47.77%
dist/bd05cf75adf7387e88ed.png217.10KB116.32KB▼ 46.42%
freemius/assets/img/wa-site-chat.png9.16KB5.26KB▼ 42.58%