90% kh-chatgpt-frontend-fun

Code Review | ChatGPT Simple Playground

WordPress plugin ChatGPT Simple Playground scored 90% from 54 tests.

About plugin

  • Plugin page: kh-chatgpt-fronte...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 28, 2023
  • Latest release: Mar 31, 2023
  • Number of updates: 14
  • Update frequency: every 0.2 days
  • Top authors: knowhalim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 323 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.50ms] Passed 4 tests

Analyzing server-side resources used by ChatGPT Simple Playground
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0838.99 ▼0.93
Dashboard /wp-admin3.39 ▲0.0948.26 ▼1.12
Posts /wp-admin/edit.php3.50 ▲0.1549.12 ▲0.23
Add New Post /wp-admin/post-new.php5.99 ▲0.1093.11 ▼12.18
Media Library /wp-admin/upload.php3.31 ▲0.0836.58 ▲6.30

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for ChatGPT Simple Playground
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲8413.19 ▼1.181.61 ▼0.1539.44 ▼2.37
Dashboard /wp-admin2,225 ▲344.87 ▼1.03108.04 ▲8.8837.51 ▼2.81
Posts /wp-admin/edit.php2,105 ▲162.02 ▲0.0139.15 ▲4.1034.25 ▲0.08
Add New Post /wp-admin/post-new.php1,540 ▼218.47 ▲0.11620.58 ▲0.0454.88 ▲3.21
Media Library /wp-admin/upload.php1,410 ▲254.16 ▼0.0598.34 ▼0.9544.38 ▼1.10

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: text to image, featured image, txt2img, ai, artificial intelligence

kh-chatgpt-frontend-fun/kh-chatgpt-frontend-fun.php Passed 13 tests

The entry point to "ChatGPT Simple Playground" version 1.1.0 is a PHP file that has certain tags in its header comment area
125 characters long description:
This is a simple chatgpt frontend to let user play, you can specify how many times you want to allow user to request per day.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected411 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6129246411
CSS1030
JavaScript1130

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.20
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.91
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes120.00%
Methods23
▷ Static methods14.35%
▷ Public methods2086.96%
▷ Protected methods00.00%
▷ Private methods313.04%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin