84% obotai

Code Review | ObotAI

WordPress plugin ObotAI scored84%from 54 tests.

About plugin

  • Plugin page: obotai
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.0
  • WordPress version: 6.3.1
  • First release: Mar 30, 2019
  • Latest release: Aug 19, 2020
  • Number of updates: 11
  • Update frequency: every 46.3 days
  • Top authors: tokibito (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /690 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by ObotAI
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0351.38 ▲9.50
Dashboard /wp-admin3.33 ▲0.0347.81 ▼3.63
Posts /wp-admin/edit.php3.39 ▲0.0346.23 ▲0.04
Add New Post /wp-admin/post-new.php5.92 ▲0.0390.64 ▼7.23
Media Library /wp-admin/upload.php3.26 ▲0.0334.96 ▼0.35

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: 1 new table, 7 new options
New tables
wp_obotai_setting
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
obotai_db_version

Browser metrics Passed 4 tests

Checking browser requirements for ObotAI
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5913.21 ▼1.401.79 ▼0.2347.77 ▲2.87
Dashboard /wp-admin2,219 ▲316.00 ▲1.1299.53 ▼10.2339.71 ▼3.19
Posts /wp-admin/edit.php2,105 ▲162.03 ▲0.0436.29 ▼0.5634.97 ▲0.01
Add New Post /wp-admin/post-new.php1,546 ▲1323.32 ▲0.21611.57 ▼67.5453.23 ▼11.03
Media Library /wp-admin/upload.php1,404 ▲164.20 ▼0.0296.38 ▼10.9042.73 ▼2.59

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: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • obotai_db_version
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% 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 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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/obotai/obotai.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% 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
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (`/assets/wp-obotai.png`)
You can look at the official readme.txt

obotai/obotai.php Passed 13 tests

The entry point to "ObotAI" version 2.0.0 is a PHP file that has certain tags in its header comment area
46 characters long description:
ObotAIのWebChatを設置するプラグイン

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin225 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23334225

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.20
Average class complexity6.50
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity2.83
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/wp-obotai.png84.01KB30.79KB▼ 63.35%