10% salesmartly-chat

Code Review | SaleSmartly – Live Chat & Chat Bot Integrate

WordPress plugin SaleSmartly – Live Chat & Chat Bot Integrate scored10%from 54 tests.

About plugin

  • Plugin page: salesmartly-chat
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 6.3.1
  • First release: Mar 4, 2022
  • Latest release: Mar 28, 2023
  • Number of updates: 26
  • Update frequency: every 15.0 days
  • Top authors: salesmartly2021 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,084 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function '' not found or invalid function name

Server metrics [RAM: ▲0.06MB] [CPU: ▼2.03ms] Passed 4 tests

This is a short check of server-side resources used by SaleSmartly – Live Chat & Chat Bot Integrate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.85 ▲3.72
Dashboard /wp-admin3.37 ▲0.0749.82 ▼1.97
Posts /wp-admin/edit.php3.48 ▲0.1351.80 ▲1.70
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.12 ▼6.74
Media Library /wp-admin/upload.php3.29 ▲0.0637.50 ▼1.10

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for SaleSmartly – Live Chat & Chat Bot Integrate
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.57 ▼0.721.82 ▲0.1343.03 ▼0.98
Dashboard /wp-admin2,221 ▲154.86 ▲0.01110.29 ▲0.1739.26 ▼4.49
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0639.88 ▲6.5333.20 ▼5.62
Add New Post /wp-admin/post-new.php1,554 ▲2818.30 ▲0.50649.28 ▼57.4950.90 ▼5.50
Media Library /wp-admin/upload.php1,403 ▼04.21 ▼0.02108.45 ▼3.0846.85 ▼1.72

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/salesmartly-chat/salesmartly.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
Please take inspiration from this readme.txt

salesmartly-chat/salesmartly.php 85% from 13 tests

"SaleSmartly – Live Chat & Chat Bot Integrate" version 1.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 198 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("salesmartly-chat.php" instead of "salesmartly.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
Success! There were no dangerous files found in this plugin364 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP9100111364

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity4.75
▷ Minimum class complexity1.00
▷ Maximum class complexity9.00
Average method complexity1.94
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods32
▷ Static methods825.00%
▷ Public methods2475.00%
▷ Protected methods00.00%
▷ Private methods825.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants18.33%
▷ Class constants1191.67%
▷ Public constants11100.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
There were not PNG files found in your plugin