77% kiko-bot

Code Review | Kiko Chatbot

WordPress plugin Kiko Chatbot scored77%from 54 tests.

About plugin

  • Plugin page: kiko-bot
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.0.0
  • WordPress version: 6.3.1
  • First release: Jun 4, 2021
  • Latest release: Jun 26, 2022
  • Number of updates: 24
  • Update frequency: every 17.6 days
  • Top authors: kikobot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /386 total downloads

Benchmarks

Plugin footprint 82% 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.07MB] [CPU: ▼5.42ms] Passed 4 tests

A check of server-side resources used by Kiko Chatbot
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0527.67 ▼19.89
Dashboard /wp-admin3.43 ▲0.1346.40 ▼4.29
Posts /wp-admin/edit.php3.48 ▲0.1349.08 ▲6.39
Add New Post /wp-admin/post-new.php5.95 ▲0.0699.00 ▲3.27
Media Library /wp-admin/upload.php3.29 ▲0.0636.42 ▼0.78

Server storage [IO: ▲2.76MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
These are issues you should consider
  • Illegal file modification found: 2 files (0.06KB) outside of "wp-content/plugins/kiko-bot/" and "wp-content/uploads/"
    • (new file) wp-content/wpmvc/log/.empty
    • (new file) wp-content/wpmvc/cache/pcom/.htaccess
Filesystem: 558 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Kiko Chatbot
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲9913.16 ▼1.191.80 ▼0.3341.34 ▼2.33
Dashboard /wp-admin2,221 ▲334.86 ▼0.95111.72 ▲13.3742.42 ▼3.09
Posts /wp-admin/edit.php2,107 ▲362.06 ▲0.0539.38 ▲0.9734.29 ▲0.52
Add New Post /wp-admin/post-new.php1,551 ▲1823.26 ▲0.00638.08 ▼47.6053.92 ▼5.42
Media Library /wp-admin/upload.php1,400 ▲124.18 ▼0.0598.59 ▼11.6240.75 ▼6.61

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/kiko-bot/assets/views/kiko-embed-code.php
  • 331× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Cluster\\Distributor\\HashRing' not found in wp-content/plugins/kiko-bot/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Cluster/Distributor/KetamaRing.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/kiko-bot/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Command/KeyDump.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Predis\\Protocol\\Text\\Handler\\ResponseHandlerInterface' not found in wp-content/plugins/kiko-bot/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Protocol/Text/Handler/MultiBulkResponse.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/kiko-bot/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Command/HashValues.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\PredisException' not found in wp-content/plugins/kiko-bot/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Response/ServerException.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/kiko-bot/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Command/StringSet.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Profile\\RedisProfile' not found in wp-content/plugins/kiko-bot/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Profile/RedisVersion300.php:19
    • > PHP Fatal error
      Uncaught Predis\\Connection\\ConnectionException: Connection refused [tcp://127.0.0.1:6379] in wp-content/plugins/kiko-bot/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Connection/AbstractConnection.php:146
    • > PHP Fatal error
      Uncaught Error: Class 'Predis\\Command\\Command' not found in wp-content/plugins/kiko-bot/vendor/10quality/wpmvc-phpfastcache/src/_extensions/predis-1.0/src/Command/StringGetMultiple.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/kiko-bot/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5

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 86% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Donate link: Please fix this invalid URI: "-"
You can look at the official readme.txt

kiko-bot/plugin.php 77% from 13 tests

This is the main PHP file of "Kiko Chatbot" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("kiko-bot.php" instead of "plugin.php")
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.0" instead of "5.4")

Code Analysis 97% from 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
Good job! No executable or dangerous file extensions detected30,855 lines of code in 521 files:
LanguageFilesBlank linesComment linesLines of code
PHP4715,42517,71924,320
Markdown221,62104,664
JSON17101,425
PO File35757341
XML50071
INI16624
make1409
CSS1001

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
It is recommended to fix the following
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 121)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity7.51
▷ Minimum class complexity1.00
▷ Maximum class complexity162.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity121.00
Code structure
Namespaces49
Interfaces61
Traits16
Classes366
▷ Abstract classes236.28%
▷ Concrete classes34393.72%
▷ Final classes226.41%
Methods2,109
▷ Static methods2109.96%
▷ Public methods1,74082.50%
▷ Protected methods1929.10%
▷ Private methods1778.39%
Functions182
▷ Named functions6736.81%
▷ Anonymous functions11563.19%
Constants93
▷ Global constants55.38%
▷ Class constants8894.62%
▷ Public constants88100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.74MB with 0.47MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/kiko-icon-filled.png27.70KB11.22KB▼ 59.48%
assets/icon-256x256.png23.56KB7.75KB▼ 67.11%
assets/img/kiko-icon.png24.59KB9.76KB▼ 60.32%
assets/screenshot-2.png216.45KB75.53KB▼ 65.11%
assets/icon-128x128.png9.92KB2.97KB▼ 70.00%