84% wany-chat

Code Review | Wany.Chat

WordPress plugin Wany.Chat scored84%from 54 tests.

About plugin

  • Plugin page: wany-chat
  • Plugin version: 1.3.16.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 9, 2021
  • Latest release: Oct 2, 2023
  • Number of updates: 45
  • Update frequency: every 15.4 days
  • Top authors: wanychat (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,642 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.03ms] Passed 4 tests

Server-side resources used by Wany.Chat
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.72 ▼0.72
Dashboard /wp-admin3.34 ▲0.0348.76 ▼3.29
Posts /wp-admin/edit.php3.39 ▲0.0349.93 ▼1.43
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.51 ▼6.38
Media Library /wp-admin/upload.php3.26 ▲0.0334.46 ▼1.03
Wany.Chat /wp-admin/options-general.php?page=rrbot-settings3.2232.24

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 101 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wany.Chat
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5813.18 ▼1.472.04 ▼0.9343.21 ▼3.63
Dashboard /wp-admin2,225 ▲225.86 ▲0.94111.93 ▲6.5045.10 ▲2.74
Posts /wp-admin/edit.php2,101 ▲42.06 ▲0.0334.48 ▼3.2532.29 ▼5.39
Add New Post /wp-admin/post-new.php1,529 ▼1117.70 ▼5.45675.82 ▲20.9054.82 ▼4.76
Media Library /wp-admin/upload.php1,404 ▲74.18 ▼0.0196.96 ▼5.0342.07 ▼4.61
Wany.Chat /wp-admin/options-general.php?page=rrbot-settings7672.0225.3926.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'ChatBot\\ChB_Payment' not found in wp-content/plugins/wany-chat/includes/ChB_PaymentMercadoPago.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ChatBot\\is_ssl() in wp-content/plugins/wany-chat/includes/ChB_CheckRequirements.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ChatBot\\ChB_KeyValueStorage' not found in wp-content/plugins/wany-chat/includes/ChB_KeyValueStorageSQL.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ChatBot\\ChB_Payment' not found in wp-content/plugins/wany-chat/includes/ChB_PaymentRobokassa.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ChatBot\\ChB_KeyValueStorage' not found in wp-content/plugins/wany-chat/includes/ChB_KeyValueStorageRedis.php:5

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Tags: There are too many tags (17 tag instead of maximum 10)
You can take inspiration from this readme.txt

wany-chat/wany-chat.php Passed 13 tests

The principal PHP file in "Wany.Chat" v. 1.3.16.6 is loaded by WordPress automatically on each request
63 characters long description:
Turn your WooCommerce store into Selling Chatbot. Automatically

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin21,123 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
PHP684,40877720,996
JavaScript1237127

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity59.41
▷ Minimum class complexity1.00
▷ Maximum class complexity402.00
Average method complexity5.04
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes66
▷ Abstract classes34.55%
▷ Concrete classes6395.45%
▷ Final classes00.00%
Methods946
▷ Static methods66069.77%
▷ Public methods89194.19%
▷ Protected methods90.95%
▷ Private methods464.86%
Functions38
▷ Named functions1026.32%
▷ Anonymous functions2873.68%
Constants545
▷ Global constants10.18%
▷ Class constants54499.82%
▷ Public constants51394.30%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
27 PNG files occupy 0.32MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/next-page-pt.png20.62KB10.64KB▼ 48.38%
assets/img/next-page-horizontal-en.png9.89KB6.04KB▼ 38.91%
assets/img/color2.png1.84KB0.15KB▼ 91.84%
assets/img/color4.png1.84KB0.15KB▼ 91.85%
assets/img/wanychat-logo.png7.83KB7.79KB▼ 0.52%