84% shortcode-chatgpt-openai

Code Review | Embed ChatGPT OpenAI

WordPress plugin Embed ChatGPT OpenAI scored84%from 54 tests.

About plugin

  • Plugin page: shortcode-chatgpt...
  • Plugin version: 1.0
  • PHP compatiblity: 8.1.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 17, 2023
  • Latest release: Feb 17, 2023
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: slidessale001 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /493 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.02MB] [CPU: ▼1.50ms] Passed 4 tests

Analyzing server-side resources used by Embed ChatGPT OpenAI
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.0240.73 ▼6.14
Dashboard /wp-admin3.59 ▲0.0253.02 ▼0.51
Posts /wp-admin/edit.php3.70 ▲0.0255.45 ▲2.63
Add New Post /wp-admin/post-new.php6.17 ▲0.02100.99 ▲8.16
Media Library /wp-admin/upload.php3.51 ▲0.0237.29 ▼1.98

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Embed ChatGPT OpenAI
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,802 ▲4114.38 ▲0.152.07 ▼0.1142.32 ▼0.93
Dashboard /wp-admin2,213 ▲335.63 ▲0.0984.00 ▼10.3843.05 ▼0.58
Posts /wp-admin/edit.php2,115 ▲121.98 ▼0.0740.23 ▲2.4242.98 ▲6.84
Add New Post /wp-admin/post-new.php1,395 ▼13117.66 ▼0.07539.98 ▼151.4246.88 ▼19.01
Media Library /wp-admin/upload.php1,415 ▲154.18 ▼0.02101.42 ▼8.5536.88 ▼9.83

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please take a closer look at the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/shortcode-chatgpt-openai/embed_chatgpt_openai.php:55
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/shortcode-chatgpt-openai/token.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Contributors: Contributors not specified
The official readme.txt is a good inspiration

shortcode-chatgpt-openai/embed_chatgpt_openai.php 92% from 13 tests

The main file in "Embed ChatGPT OpenAI" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("shortcode-chatgpt-openai.php" instead of "embed_chatgpt_openai.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
There were no executable files found in this plugin103 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP21915103

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin