68% instant-chat-wp

Code Review | Instant Chat Floating Button for WordPress Websites

WordPress plugin Instant Chat Floating Button for WordPress Websites scored68%from 54 tests.

About plugin

  • Plugin page: instant-chat-wp
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.1.0
  • WordPress version: 6.3.1
  • First release: Oct 22, 2022
  • Latest release: Nov 12, 2022
  • Number of updates: 13
  • Update frequency: every 1.7 days
  • Top authors: istmoplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /232 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: ▲0.25MB] [CPU: ▼7.13ms] Passed 4 tests

An overview of server-side resources used by Instant Chat Floating Button for WordPress Websites
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1539.45 ▼4.81
Dashboard /wp-admin3.57 ▲0.2253.66 ▼7.76
Posts /wp-admin/edit.php3.67 ▲0.3146.57 ▲1.13
Add New Post /wp-admin/post-new.php6.28 ▲0.3977.43 ▼17.09
Media Library /wp-admin/upload.php3.53 ▲0.2936.66 ▲3.29
Go Premium /wp-admin/admin.php?page=instantchatwp&tab=pro3.4433.24
Appearance /wp-admin/admin.php?page=instantchatwp&tab=customize3.4431.17
Instant Chat WP /wp-admin/admin.php?page=instantchatwp3.4533.97
Agents /wp-admin/admin.php?page=instantchatwp&tab=users3.4533.47
Settings /wp-admin/admin.php?page=instantchatwp&tab=settings3.4534.55

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 124 new files
Database: 2 new tables, 8 new options
New tables
wp_instantchatwp_staff_availability
wp_instantchat_whatsapp_stats
New WordPress options
db_upgraded
instantchatwp_pro_active
widget_recent-posts
instantchatwp_options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Instant Chat Floating Button for WordPress Websites
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲13114.47 ▲0.091.64 ▼0.4841.41 ▲3.21
Dashboard /wp-admin2,293 ▲1056.12 ▲0.27128.50 ▲22.0184.40 ▲43.82
Posts /wp-admin/edit.php2,194 ▲1052.80 ▲0.7540.87 ▼1.1454.92 ▲19.13
Add New Post /wp-admin/post-new.php1,602 ▲6523.54 ▲5.41689.85 ▲69.8438.74 ▼18.10
Media Library /wp-admin/upload.php1,482 ▲974.83 ▲0.5590.87 ▼11.1885.85 ▲42.68
Go Premium /wp-admin/admin.php?page=instantchatwp&tab=pro9712.4234.7364.00
Appearance /wp-admin/admin.php?page=instantchatwp&tab=customize9482.4237.3560.65
Instant Chat WP /wp-admin/admin.php?page=instantchatwp1,1262.4234.0061.30
Agents /wp-admin/admin.php?page=instantchatwp&tab=users9482.4334.6063.23
Settings /wp-admin/admin.php?page=instantchatwp&tab=settings1,1202.4434.1256.96

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
The following items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_instantchat_whatsapp_stats
    • wp_instantchatwp_staff_availability
  • Zombie WordPress options were found after uninstall: 8 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • instantchatwp_pro_active
    • widget_recent-comments
    • widget_recent-posts
    • instantchatwp_options

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 | 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 items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/instant-chat-wp/admin/tabs/welcome.php
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to get property 'agent' of non-object in wp-content/plugins/instant-chat-wp/admin/tabs/main.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'InstantChatWPCommon' not found in wp-content/plugins/instant-chat-wp/classes/admin.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/instant-chat-wp/classes/common.php:735
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/instant-chat-wp/classes/cropimage.php:94
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_total_period() on null in wp-content/plugins/instant-chat-wp/admin/tabs/main.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instant-chat-wp/admin/tabs/customize.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instant-chat-wp/admin/tabs/users.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instant-chat-wp/admin/tabs/pro.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/instant-chat-wp/classes/shorcodes.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/instant-chat-wp/admin/tabs/settings.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Floating Instant Chat), #2 (Multiple Agents), #3 (Custom Chat Box), #4 (Advanced Stats)
The official readme.txt is a good inspiration

instant-chat-wp/index.php 92% from 13 tests

The primary PHP file in "Instant Chat Floating Button for WordPress Websites" version 1.0.5 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("instant-chat-wp.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected17,870 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
CSS9318645,548
SVG4103,167
Sass2350482,649
LESS2350642,635
JavaScript82213891,870
PHP12566581,681
PO File2127129320

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity20.00
▷ Minimum class complexity1.00
▷ Maximum class complexity45.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods57
▷ Static methods11.75%
▷ Public methods57100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
13 PNG files occupy 0.56MB with 0.23MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/error.png1.38KB1.31KB▼ 5.30%
admin/images/edit_1616.png0.68KB0.70KB0.00%
screenshot-3.png32.52KB13.51KB▼ 58.45%
admin/images/small_logo_16x16.png16.93KB0.43KB▼ 97.46%
screenshot-4.png66.90KB36.50KB▼ 45.44%