72% ays-chatgpt-assistant

Code Review | AI ChatBot with ChatGPT and Content Generator by AYS

WordPress plugin AI ChatBot with ChatGPT and Content Generator by AYS scored72%from 54 tests.

About plugin

  • Plugin page: ays-chatgpt-assis...
  • Plugin version: 1.6.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 18, 2023
  • Latest release: Nov 28, 2023
  • Number of updates: 152
  • Update frequency: every 1.9 days
  • Top authors: ays-pro (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /9,257 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.79MB] [CPU: ▲1.46ms] Passed 4 tests

An overview of server-side resources used by AI ChatBot with ChatGPT and Content Generator by AYS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.24 ▲0.7843.63 ▲2.09
Dashboard /wp-admin4.12 ▲0.8251.18 ▲0.69
Posts /wp-admin/edit.php4.16 ▲0.8060.01 ▲13.19
Add New Post /wp-admin/post-new.php6.77 ▲0.8890.10 ▼2.77
Media Library /wp-admin/upload.php4.01 ▲0.7841.02 ▲5.83
Grab Your GIFT /wp-admin/admin.php?page=ays-chatgpt-assistant-gift4.0448.27
Content Generator /wp-admin/admin.php?page=ays-chatgpt-assistant-content-generator4.0443.27
General Settings /wp-admin/admin.php?page=ays-chatgpt-assistant-general-settings4.0460.47
Embeddings /wp-admin/admin.php?page=ays-chatgpt-assistant-embedding4.0445.53
PRO Features /wp-admin/admin.php?page=ays-chatgpt-assistant-features4.0562.93
How to Use /wp-admin/admin.php?page=ays-chatgpt-assistant-how-to-use4.0443.97
Front chat /wp-admin/admin.php?page=ays-chatgpt-assistant-front-chat4.1058.51
Settings /wp-admin/admin.php?page=ays-chatgpt-assistant4.5246.58
Logs /wp-admin/admin.php?page=ays-chatgpt-assistant-logs4.0442.58

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 124 new files
Database: 4 new tables, 9 new options
New tables
wp_ayschatgpt_settings
wp_ayschatgpt_data
wp_ayschatgpt_front_settings
wp_ayschatgpt_general_settings
New WordPress options
ays_chatgpt_assistant_db_version
ays_chatgpt_banner_time
widget_recent-comments
widget_recent-posts
db_upgraded
ays_chatgpt_sale_btn
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

AI ChatBot with ChatGPT and Content Generator by AYS: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,202 ▲44013.59 ▼0.7711.36 ▲9.6631.51 ▼11.68
Dashboard /wp-admin2,264 ▲865.60 ▼0.0796.60 ▼16.6276.44 ▲33.25
Posts /wp-admin/edit.php2,188 ▲882.02 ▲0.0640.27 ▼1.1637.07 ▲1.08
Add New Post /wp-admin/post-new.php1,593 ▲6723.16 ▲0.01697.45 ▲75.8633.42 ▼21.90
Media Library /wp-admin/upload.php1,472 ▲724.15 ▼0.0397.46 ▼2.5363.56 ▲20.13
Grab Your GIFT /wp-admin/admin.php?page=ays-chatgpt-assistant-gift1,4443.7854.66142.34
Content Generator /wp-admin/admin.php?page=ays-chatgpt-assistant-content-generator1,97111.00300.41113.79
General Settings /wp-admin/admin.php?page=ays-chatgpt-assistant-general-settings1,5283.8055.7283.07
Embeddings /wp-admin/admin.php?page=ays-chatgpt-assistant-embedding2,12112.51311.9088.80
PRO Features /wp-admin/admin.php?page=ays-chatgpt-assistant-features1,9713.7751.9796.13
How to Use /wp-admin/admin.php?page=ays-chatgpt-assistant-how-to-use1,93110.64282.4682.08
Front chat /wp-admin/admin.php?page=ays-chatgpt-assistant-front-chat1,9853.9559.3469.31
Settings /wp-admin/admin.php?page=ays-chatgpt-assistant3,8404.1378.8477.41
Logs /wp-admin/admin.php?page=ays-chatgpt-assistant-logs1,4833.7850.8072.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • ays_chatgpt_sale_btn
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • ays_chatgpt_banner_time

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/ays-chatgpt-assistant/public/partials/chatgpt-assistant-public-display.php
  • 17× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/ays-chatgpt-assistant/admin/partials/general-settings/chatgpt-assistant-general-settings-action-options.php:12
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ays-chatgpt-assistant/admin/partials/content-generator/chatgpt-assistant-content-generator-display.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ays-chatgpt-assistant/admin/partials/gifts/chatgpt-assistant-gifts-display.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ays-chatgpt-assistant/admin/partials/front-chat/chatgpt-assistant-front-chat-actions-options.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ays-chatgpt-assistant/admin/partials/settings/chatgpt-assistant-settings-action-options.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'ChatGPT_Assistant_Main_DB_Actions' not found in wp-content/plugins/ays-chatgpt-assistant/includes/chatgpt-assistant-db-actions/class-chatgpt-assistant-front-chat-db-actions.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ays-chatgpt-assistant/admin/partials/chatgpt-assistant-data-display.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ays-chatgpt-assistant/admin/partials/embeddings/chatgpt-assistant-embedding-display.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ays-chatgpt-assistant/admin/partials/settings/chatgpt-assistant-settings-action-options.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ays-chatgpt-assistant/admin/partials/chatgpt-assistant-chatbox-display.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=ays-chatgpt-assistant-content-generator
    • > Other (warning) in unknown
    /wp-admin/admin.php?page=ays-chatgpt-assistant-content-generator 322 Unrecognized feature: 'web-share'.
    • > GET request to /wp-admin/admin.php?page=ays-chatgpt-assistant-embedding
    • > Other (warning) in unknown
    /wp-admin/admin.php?page=ays-chatgpt-assistant-embedding 317 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
You can take inspiration from this readme.txt

ays-chatgpt-assistant/chatgpt-assistant.php 92% from 13 tests

The main PHP script in "AI ChatBot with ChatGPT and Content Generator by AYS" version 1.6.6 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ays-chatgpt-assistant.php" instead of "chatgpt-assistant.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected9,845 lines of code in 82 files:
LanguageFilesBlank linesComment linesLines of code
PHP316198504,850
CSS125791,0442,927
JavaScript13310891,937
SVG26153131

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity40.23
▷ Minimum class complexity1.00
▷ Maximum class complexity161.00
Average method complexity6.31
▷ Minimum method complexity1.00
▷ Maximum method complexity99.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods96
▷ Static methods1111.46%
▷ Public methods9194.79%
▷ Protected methods00.00%
▷ Private methods55.21%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants17
▷ Global constants17100.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
23 PNG files occupy 0.18MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/icons/guest_icon_7.png0.92KB0.45KB▼ 51.01%
admin/images/icons/ai.png0.55KB0.44KB▼ 19.96%
admin/images/icons/guest_icon_5.png0.93KB0.48KB▼ 48.74%
admin/images/icons/guest_icon_6.png0.92KB0.47KB▼ 49.42%
admin/images/halloween_banner_plugins.png114.44KB40.57KB▼ 64.55%