10% chatrify-live-chat

Code Review | Chatrify Live Chat

WordPress plugin Chatrify Live Chat scored10%from 54 tests.

About plugin

  • Plugin page: chatrify-live-chat
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1.1
  • WordPress version: 6.3.1
  • First release: Mar 23, 2015
  • Latest release: Aug 31, 2015
  • Number of updates: 26
  • Update frequency: every 7.1 days
  • Top authors: chatrify (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /4,752 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/chatrify-live-chat/wp-chatrify.php+440
    Non-static method Chatrify::get_instance() should not be called statically

Server metrics [RAM: ▼1.90MB] [CPU: ▼54.44ms] Passed 4 tests

A check of server-side resources used by Chatrify Live Chat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.374.42 ▼36.60
Dashboard /wp-admin2.11 ▼1.235.80 ▼54.88
Posts /wp-admin/edit.php2.11 ▼1.246.38 ▼37.99
Add New Post /wp-admin/post-new.php2.11 ▼3.775.28 ▼88.29
Media Library /wp-admin/upload.php2.11 ▼1.115.29 ▼26.89
Settings /wp-admin/admin.php?page=chatrify_settings2.116.25

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Chatrify Live Chat: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.76 ▲0.371.70 ▼0.0741.03 ▼4.90
Dashboard /wp-admin2,232 ▲504.92 ▲0.0097.35 ▼19.4682.73 ▲36.59
Posts /wp-admin/edit.php2,118 ▲291.99 ▼0.0335.49 ▼0.3934.29 ▼2.10
Add New Post /wp-admin/post-new.php1,691 ▲15822.80 ▼0.52705.50 ▲63.9157.06 ▼3.18
Media Library /wp-admin/upload.php1,408 ▲234.14 ▼0.13106.43 ▲5.6344.47 ▲2.71
Settings /wp-admin/admin.php?page=chatrify_settings9702.1026.8225.12

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/chatrify-live-chat/wp-chatrify.php+440
    Non-static method Chatrify::get_instance() should not be called statically
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/admin.php?page=chatrify_settings
    • > Deprecated in wp-content/plugins/chatrify-live-chat/wp-chatrify.php+440
    Non-static method Chatrify::get_instance() should not be called statically
    • > GET request to /wp-admin/admin.php?page=chatrify_settings
    • > Notice in wp-content/plugins/chatrify-live-chat/wp-chatrify.php+287
    Undefined property: Chatrify::$plugin_url
    • > GET request to /wp-admin/admin.php?page=chatrify_settings
    • > Notice in wp-content/plugins/chatrify-live-chat/wp-chatrify.php+302
    Undefined property: Chatrify::$plugin_version
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=chatrify_settings
    • > Notice in wp-content/plugins/chatrify-live-chat/wp-chatrify.php+310
    Undefined index: wp-chatrify.php
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=chatrify_settings
    • > Notice in wp-content/plugins/chatrify-live-chat/wp-chatrify.php+310
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=chatrify_settings
    • > User deprecated in wp-includes/functions.php+5453
    Function get_currentuserinfo is deprecated since version 4.5.0! Use wp_get_current_user() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chatrify-live-chat/wp-chatrify.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots do not have images: #1 (Chat widget on your website - active chat), #2 (Chatrify Configuration for existing Customer - Link up), #3 (Chatrify Configuration for new Customer - Enter details), #4 (Widget Customization from Dashboard)
  • Tags: You are using too many tags: 38 tag instead of maximum 10
The official readme.txt is a good inspiration

chatrify-live-chat/wp-chatrify.php 92% from 13 tests

The primary PHP file in "Chatrify Live Chat" version 1.1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("chatrify-live-chat.php" instead of "wp-chatrify.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin565 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP17256312
JavaScript1533253

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity32.00
▷ Minimum class complexity32.00
▷ Maximum class complexity32.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1487.50%
▷ Protected methods212.50%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-3.png25.73KB8.56KB▼ 66.73%
favicon.png2.04KB0.95KB▼ 53.71%
screenshot-1.png65.18KB23.32KB▼ 64.22%
screenshot-4.png45.97KB15.65KB▼ 65.95%
logo.png3.80KB1.88KB▼ 50.60%