83% aibuddy-openai-chatgpt

Code Review | AiBud WP - ChatGPT, OpenAI, Content & Image Generator WordPress plugin

WordPress plugin AiBud WP - ChatGPT, OpenAI, Content & Image Generator WordPress plugin scored83%from 54 tests.

About plugin

  • Plugin page: aibuddy-openai-ch...
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Mar 23, 2023
  • Latest release: Aug 10, 2023
  • Number of updates: 16
  • Update frequency: every 8.8 days
  • Top authors: stylemix (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

3,000+ active /20,372 total downloads

Benchmarks

Plugin footprint 82% 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.31MB] [CPU: ▲1.59ms] 75% from 4 tests

This is a short check of server-side resources used by AiBud WP - ChatGPT, OpenAI, Content & Image Generator WordPress plugin
Please fix the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 588.86ms on /wp-admin/admin.php?page=ai_buddy_gopro)
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1939.87 ▲1.39
Dashboard /wp-admin3.68 ▲0.3761.96 ▲12.27
Posts /wp-admin/edit.php3.73 ▲0.3850.75 ▲2.53
Add New Post /wp-admin/post-new.php6.68 ▲0.7990.07 ▼4.97
Media Library /wp-admin/upload.php3.54 ▲0.3142.22 ▲7.42
Content Builder /wp-admin/admin.php?page=ai_buddy_content_builder3.6039.15
Settings /wp-admin/admin.php?page=ai_buddy_settings3.5637.04
Image Generator /wp-admin/admin.php?page=ai_buddy_image_generator3.6438.61
Playground /wp-admin/admin.php?page=ai_buddy_playground3.5436.87
Upgrade /wp-admin/admin.php?page=ai_buddy_gopro3.62588.86

Server storage [IO: ▲0.84MB] [DB: ▲0.01MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Checking browser requirements for AiBud WP - ChatGPT, OpenAI, Content & Image Generator WordPress plugin
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,919 ▲15813.30 ▼1.231.51 ▼0.0242.64 ▲4.15
Dashboard /wp-admin2,328 ▲1514.93 ▼0.7190.75 ▼7.8685.08 ▲38.37
Posts /wp-admin/edit.php2,235 ▲1352.39 ▲0.3538.07 ▼4.6761.10 ▲23.04
Add New Post /wp-admin/post-new.php6,607 ▲5,07028.17 ▲5.11885.92 ▲236.6248.57 ▲3.08
Media Library /wp-admin/upload.php1,520 ▲1204.58 ▲0.3999.68 ▲5.8689.81 ▲50.49
Content Builder /wp-admin/admin.php?page=ai_buddy_content_builder2,6972.1231.1177.26
Settings /wp-admin/admin.php?page=ai_buddy_settings1,5702.0331.2748.68
Image Generator /wp-admin/admin.php?page=ai_buddy_image_generator3,8391.9329.4841.97
Playground /wp-admin/admin.php?page=ai_buddy_playground1,5641.9227.7839.86
Upgrade /wp-admin/admin.php?page=ai_buddy_gopro1,1062.1628.5844.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • notification_enqueue
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 41× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/aibuddy-openai-chatgpt/includes/admin/meta-boxes/woocommerce.php:3
    • > PHP Warning
      Use of undefined constant AI_BUDDY_PATH - assumed 'AI_BUDDY_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/aibuddy-openai-chatgpt/includes/admin/page-templates/content-builder/content-builder.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/aibuddy-openai-chatgpt/includes/admin/navigation.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_remote_get() in wp-content/plugins/aibuddy-openai-chatgpt/includes/admin/page-templates/gopro.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/aibuddy-openai-chatgpt/includes/admin/page-templates/content-builder/bulk-content-builder.php:3
    • > PHP Warning
      require(AI_BUDDY_PATH/includes/class-ai-buddy-init.php): failed to open stream: No such file or directory in wp-content/plugins/aibuddy-openai-chatgpt/includes/class-ai-buddy.php on line 48
    • > PHP Fatal error
      Uncaught Error: Class 'ANP\\Popup\\ItemBase' not found in wp-content/plugins/aibuddy-openai-chatgpt/includes/admin-notifications-popup/classes/Popup/Theme/ItemStarterTheme.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/aibuddy-openai-chatgpt/includes/admin/page-templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ANP\\Popup\\ItemBase' not found in wp-content/plugins/aibuddy-openai-chatgpt/includes/admin-notifications-popup/classes/Popup/Plugin/ItemRate.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/aibuddy-openai-chatgpt/includes/admin/error-message.php:4

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed: The official readme.txt might help

aibuddy-openai-chatgpt/aibuddy-openai-chatgpt.php 92% from 13 tests

The main PHP file in "AiBud WP - ChatGPT, OpenAI, Content & Image Generator WordPress plugin" ver. 1.1.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 187 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin11,504 lines of code in 107 files:
LanguageFilesBlank linesComment linesLines of code
PHP791,0927366,956
CSS38422,782
JavaScript1441201,595
JSON20060
SVG80057
Markdown132054

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity10.81
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity2.59
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes48
▷ Abstract classes24.17%
▷ Concrete classes4695.83%
▷ Final classes1839.13%
Methods296
▷ Static methods6822.97%
▷ Public methods23278.38%
▷ Protected methods4715.88%
▷ Private methods175.74%
Functions29
▷ Named functions310.34%
▷ Anonymous functions2689.66%
Constants21
▷ Global constants942.86%
▷ Class constants1257.14%
▷ Public constants1191.67%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 compressed PNG files occupy 0.11MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ai-buddy.png1.69KB1.76KB0.00%
assets/images/ai-buddy-first-screen.png111.07KB120.17KB0.00%