74% chatbot-chatgpt

Code Review | Chatbot ChatGPT for WordPress

WordPress plugin Chatbot ChatGPT for WordPress scored74%from 54 tests.

About plugin

  • Plugin page: chatbot-chatgpt
  • Plugin version: 1.7.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.4
  • WordPress version: 6.3.1
  • First release: Apr 2, 2023
  • Latest release: Nov 29, 2023
  • Number of updates: 67
  • Update frequency: every 3.7 days
  • Top authors: kognetiks (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

400+ active /5,464 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.57MB] [CPU: ▼2.74ms] Passed 4 tests

Server-side resources used by Chatbot ChatGPT for WordPress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.97 ▲0.5146.30 ▲7.43
Dashboard /wp-admin3.92 ▲0.5849.63 ▼6.21
Posts /wp-admin/edit.php3.96 ▲0.6050.53 ▲1.03
Add New Post /wp-admin/post-new.php6.55 ▲0.6686.58 ▼10.76
Media Library /wp-admin/upload.php3.80 ▲0.5736.46 ▲5.00
Chatbot ChatGPT /wp-admin/options-general.php?page=chatbot-chatgpt3.7437.67

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 171 new files
Database: 1 new table, 8 new options
New tables
wp_chatbot_chatgpt_interactions
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
chatbot_chatgpt_plugin_version
chatbot_chatgpt_kn_status
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Chatbot ChatGPT for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲20213.65 ▼0.5111.58 ▲9.9935.76 ▼5.81
Dashboard /wp-admin2,236 ▲555.84 ▲0.0996.68 ▼7.3244.22 ▼0.31
Posts /wp-admin/edit.php2,140 ▲402.31 ▲0.3441.08 ▼2.2038.38 ▲1.32
Add New Post /wp-admin/post-new.php1,558 ▲2923.57 ▲0.22622.99 ▲6.0532.92 ▼26.29
Media Library /wp-admin/upload.php1,438 ▲354.62 ▲0.4299.57 ▲3.2041.70 ▲1.46
Chatbot ChatGPT /wp-admin/options-general.php?page=chatbot-chatgpt1,0592.2331.2630.27

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_chatbot_chatgpt_interactions
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • chatbot_chatgpt_plugin_version
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/chatbot-chatgpt/includes/chatbot-chatgpt-settings-kn-analysis.php:72
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/chatbot-chatgpt/includes/chatbot-chatgpt-settings-crawler.php:13

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: customer-support, ai, assistants, chatbot, openai...

chatbot-chatgpt/chatbot-chatgpt.php Passed 13 tests

"Chatbot ChatGPT for WordPress" version 1.7.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
67 characters long description:
A simple plugin to add a Chatbot ChatGPT to your Wordpress Website.

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
No dangerous file extensions were detected4,145 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP349031,3043,351
JavaScript3136144528
CSS14133266

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods777.78%
▷ Protected methods00.00%
▷ Private methods222.22%
Functions126
▷ Named functions12095.24%
▷ Anonymous functions64.76%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
111 PNG files occupy 3.98MB with 2.70MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icons/icon-018.png74.86KB23.06KB▼ 69.19%
assets/icons/icon-017.png60.22KB21.71KB▼ 63.95%
assets/icons/chinese-006.png47.78KB13.83KB▼ 71.05%
assets/icons/chinese-003.png22.74KB6.98KB▼ 69.29%
assets/icons/icon-021.png37.18KB12.84KB▼ 65.48%