83% bot-cat

Code Review | BotCat

WordPress plugin BotCat scored83%from 54 tests.

About plugin

  • Plugin page: bot-cat
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Jul 23, 2022
  • Latest release: Aug 29, 2022
  • Number of updates: 29
  • Update frequency: every 1.3 days
  • Top authors: eric0324 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,273 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▲1.82ms] Passed 4 tests

Analyzing server-side resources used by BotCat
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2445.00 ▲5.98
Dashboard /wp-admin3.60 ▲0.3048.39 ▼0.06
Posts /wp-admin/edit.php3.65 ▲0.3049.59 ▲1.94
Add New Post /wp-admin/post-new.php6.13 ▲0.25100.20 ▲1.66
Media Library /wp-admin/upload.php3.46 ▲0.2436.62 ▲3.73
LINE Notify /wp-admin/admin.php?page=bot-cat-line-notify-admin3.4335.57
BotCat /wp-admin/admin.php?page=bot-cat3.4333.39
LINE /wp-admin/admin.php?page=bot-cat-line-admin3.4331.71
Telegram /wp-admin/admin.php?page=bot-cat-telegram-admin3.4334.04

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for BotCat
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,860 ▲11413.32 ▼1.072.07 ▲0.3543.77 ▼0.69
Dashboard /wp-admin2,238 ▲505.86 ▲0.05107.42 ▼9.1937.50 ▼8.97
Posts /wp-admin/edit.php2,127 ▲382.01 ▲0.0139.93 ▲1.8335.57 ▲0.93
Add New Post /wp-admin/post-new.php1,574 ▲5523.11 ▼0.16656.08 ▼21.5157.20 ▲2.67
Media Library /wp-admin/upload.php1,423 ▲354.17 ▼0.0495.18 ▼2.8042.61 ▼2.86
LINE Notify /wp-admin/admin.php?page=bot-cat-line-notify-admin1,0082.0525.5727.81
BotCat /wp-admin/admin.php?page=bot-cat8602.0328.4127.85
LINE /wp-admin/admin.php?page=bot-cat-line-admin1,0342.0222.1426.05
Telegram /wp-admin/admin.php?page=bot-cat-telegram-admin1,0332.0424.0027.62

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/bot-cat/bot-cat.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

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
Attributes that need to be fixed:
  • Screenshots: Please add descriptions for these screenshots #1, #2 in bot-cat/assets to your readme.txt
You can look at the official readme.txt

bot-cat/bot-cat.php 85% from 13 tests

The primary PHP file in "BotCat" version 1.1.3 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("6.0" instead of "5.2")
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.4" instead of "5.6")

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,278 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP202792651,278

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity7.74
▷ Minimum class complexity1.00
▷ Maximum class complexity25.00
Average method complexity3.03
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods63
▷ Static methods00.00%
▷ Public methods6095.24%
▷ Protected methods00.00%
▷ Private methods34.76%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin