84% sa-woo-smart-chatbot

Code Review | ChatBot

WordPress plugin ChatBot scored84%from 54 tests.

About plugin

  • Plugin page: sa-woo-smart-chatbot
  • Plugin version: 0.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Apr 9, 2021
  • Latest release: Apr 11, 2021
  • Number of updates: 9
  • Update frequency: every 0.4 days
  • Top authors: jawadpro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /502 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.01MB] [CPU: ▼9.41ms] Passed 4 tests

Analyzing server-side resources used by ChatBot
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0044.58 ▲2.27
Dashboard /wp-admin3.35 ▼0.0452.59 ▼18.41
Posts /wp-admin/edit.php3.40 ▲0.0050.91 ▼1.11
Add New Post /wp-admin/post-new.php5.93 ▲0.0085.51 ▼18.41
Media Library /wp-admin/upload.php3.27 ▲0.0038.89 ▲0.28

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for ChatBot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲5614.14 ▼0.231.77 ▼0.0445.50 ▲0.20
Dashboard /wp-admin2,195 ▲185.56 ▼0.0994.96 ▼0.5941.39 ▼4.01
Posts /wp-admin/edit.php2,097 ▼32.03 ▲0.0234.36 ▼3.4535.62 ▼1.10
Add New Post /wp-admin/post-new.php1,531 ▲223.14 ▼0.11679.87 ▼1.6659.42 ▲8.67
Media Library /wp-admin/upload.php1,394 ▼64.15 ▼0.07100.14 ▲0.0944.10 ▼0.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/sa-woo-smart-chatbot/sa-woo-smart-chatbot.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
6 plugin tags: bot, woocommerce, wordpress chatbot, woocommerce chatbot, live chat...

sa-woo-smart-chatbot/sa-woo-smart-chatbot.php Passed 13 tests

The main file in "ChatBot" v. 0.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
82 characters long description:
Smartly deals customers on your website to find products according to their needs.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,272 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS2786669
PHP49045360
JavaScript28625242
SVG1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.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
7 PNG files occupy 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/imgs/settings.png1.63KB1.37KB▼ 15.66%
assets/imgs/close.png0.56KB0.36KB▼ 35.88%
assets/imgs/robot.png34.36KB12.45KB▼ 63.77%
assets/imgs/send.png0.75KB0.48KB▼ 35.90%
assets/imgs/user.png2.21KB1.80KB▼ 18.78%