72% bob-ai

Code Review | Bob AI

WordPress plugin Bob AI scored72%from 54 tests.

About plugin

  • Plugin page: bob-ai
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.2
  • WordPress version: 6.3.1
  • First release: Apr 22, 2023
  • Latest release: Apr 22, 2023
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: smartkenyan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /260 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼1.18ms] Passed 4 tests

Analyzing server-side resources used by Bob AI
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1748.57 ▲9.93
Dashboard /wp-admin3.49 ▲0.1553.20 ▼11.57
Posts /wp-admin/edit.php3.60 ▲0.2555.22 ▲7.92
Add New Post /wp-admin/post-new.php6.07 ▲0.1994.51 ▼9.18
Media Library /wp-admin/upload.php3.41 ▲0.1942.52 ▲8.13
Bob Stats /wp-admin/admin.php?page=bob-stats3.3839.27
bob-ai /wp-admin/admin.php?page=bob-settings3.3936.15

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 13 new files
Database: 1 new table, 6 new options
New tables
wp_bob_ai_stats
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Bob AI
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8114.47 ▼0.101.90 ▲0.2243.68 ▲5.70
Dashboard /wp-admin2,233 ▲504.87 ▼1.05106.88 ▲0.2241.67 ▼1.00
Posts /wp-admin/edit.php2,116 ▲301.97 ▼0.0439.57 ▲5.8435.45 ▲0.19
Add New Post /wp-admin/post-new.php1,565 ▲3218.57 ▼4.70630.20 ▼35.5650.57 ▼8.58
Media Library /wp-admin/upload.php1,415 ▲334.21 ▼0.0395.96 ▼0.3141.40 ▼2.08
Bob Stats /wp-admin/admin.php?page=bob-stats8202.0827.3426.77
bob-ai /wp-admin/admin.php?page=bob-settings1,1902.0926.0437.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=bob-settings
    • > Notice in wp-content/plugins/bob-ai/admin/bob-general.php+62
    Undefined variable: start_button_display
    • > GET request to /wp-admin/admin.php?page=bob-settings
    • > Notice in wp-content/plugins/bob-ai/admin/bob-general.php+63
    Undefined variable: stop_button_display

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× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/bob-ai/admin/bob-doc.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=bob-stats
    • > Javascript (severe) in unknown
    /wp-content/plugins/bob-ai/assets/js/bob-general.js?ver=1.0.1 17:19 Uncaught TypeError: Cannot read properties of null (reading 'style')
    • > GET request to /wp-admin/admin.php?page=bob-stats
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'replace')" "TypeError: Cannot read properties of undefined (reading 'replace')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/bob-ai/assets/js/bob-admin.js?ver=1.0.1:38:89)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=bob-stats
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'replace')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Requires at least: Version format is invalid
You can look at the official readme.txt

bob-ai/bob.php 92% from 13 tests

"Bob AI" version 1.0.1'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:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("bob-ai.php" instead of "bob.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin975 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP915267762
CSS1175109
JavaScript21818104

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity8.67
▷ Minimum class complexity2.00
▷ Maximum class complexity17.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods51
▷ Static methods47.84%
▷ Public methods4792.16%
▷ Protected methods00.00%
▷ Private methods47.84%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin