83% shopybot-woocommerce

Code Review | ShopyBot - E-Commerce Chatbot

WordPress plugin ShopyBot - E-Commerce Chatbot scored83%from 54 tests.

About plugin

  • Plugin page: shopybot-woocommerce
  • Plugin version: 1.0.18
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.5.1
  • WordPress version: 6.3.1
  • First release: Aug 28, 2017
  • Latest release: Sep 22, 2020
  • Number of updates: 27
  • Update frequency: every 41.7 days
  • Top authors: shopybot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,984 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.17ms] Passed 4 tests

Analyzing server-side resources used by ShopyBot - E-Commerce Chatbot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.75 ▼2.39
Dashboard /wp-admin3.34 ▼0.0158.98 ▼6.21
Posts /wp-admin/edit.php3.39 ▲0.0352.55 ▲3.45
Add New Post /wp-admin/post-new.php5.92 ▲0.03101.73 ▼3.54
Media Library /wp-admin/upload.php3.26 ▲0.0341.43 ▲4.54

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by ShopyBot - E-Commerce Chatbot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲6813.23 ▼1.581.82 ▲0.1451.44 ▲9.39
Dashboard /wp-admin2,232 ▲324.85 ▼1.06118.78 ▲7.7840.49 ▼4.27
Posts /wp-admin/edit.php2,118 ▲212.04 ▲0.0541.72 ▲4.0937.05 ▼0.92
Add New Post /wp-admin/post-new.php1,560 ▲3423.09 ▲5.60645.25 ▼14.6163.28 ▼9.95
Media Library /wp-admin/upload.php1,414 ▲114.19 ▲0.09109.43 ▼4.6149.21 ▼0.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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 fix the following items
  • 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/shopybot-woocommerce/shopybot-woocommerce.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

shopybot-woocommerce/shopybot-woocommerce.php 85% from 13 tests

"ShopyBot - E-Commerce Chatbot" version 1.0.18'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: Keep the plugin description shorter than 140 characters (currently 190 characters long)
  • Requires at least: The required version number must match the one declared in readme.txt ("3.9" instead of "4.9")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin3,906 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
PO File145465602,575
PHP53191811,151
CSS1230123
JavaScript115057

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity41.50
▷ Minimum class complexity3.00
▷ Maximum class complexity131.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods70
▷ Static methods34.29%
▷ Public methods6085.71%
▷ Protected methods00.00%
▷ Private methods1014.29%
Functions9
▷ Named functions666.67%
▷ Anonymous functions333.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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