78% quick-chat-gpt

Code Review | Quick Chat GPT

WordPress plugin Quick Chat GPT scored78%from 54 tests.

About plugin

  • Plugin page: quick-chat-gpt
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1.1
  • WordPress version: 6.3.1
  • First release: Feb 17, 2023
  • Latest release: Feb 17, 2023
  • Number of updates: 10
  • Update frequency: every 0.8 days
  • Top authors: logicdigger (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,022 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼4.63ms] Passed 4 tests

This is a short check of server-side resources used by Quick Chat GPT
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.24 ▼3.16
Dashboard /wp-admin3.35 ▲0.0548.32 ▼2.68
Posts /wp-admin/edit.php3.40 ▲0.0550.33 ▲0.42
Add New Post /wp-admin/post-new.php5.95 ▲0.0785.69 ▼13.11
Media Library /wp-admin/upload.php3.28 ▲0.0542.18 ▲5.56

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Quick Chat GPT: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲5515.26 ▲0.891.67 ▼0.2743.98 ▼0.00
Dashboard /wp-admin2,232 ▲446.53 ▲1.70124.08 ▲15.7542.01 ▼0.03
Posts /wp-admin/edit.php2,112 ▲232.96 ▲0.9645.59 ▲9.7834.20 ▼0.92
Add New Post /wp-admin/post-new.php1,537 ▲2318.30 ▲0.39707.73 ▼5.0437.10 ▼20.56
Media Library /wp-admin/upload.php1,417 ▲295.82 ▲1.61118.61 ▲6.5948.61 ▼2.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/quick-chat-gpt/quick-chat-gpt.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quick-chat-gpt/inc/quickchatgpt.class.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/quick-chat-gpt/template-parts/chat_gpt_style_1.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were 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
These attributes need to be fixed: You can look at the official readme.txt

quick-chat-gpt/quick-chat-gpt.php Passed 13 tests

The main file in "Quick Chat GPT" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
49 characters long description:
A plugin for adding API keys to use with Chat GPT

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin2,331 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
CSS1302,071
PHP33110247
JavaScript16013

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin