78% gpt-content-generator

Code Review | GPT Content Generator

WordPress plugin GPT Content Generator scored78%from 54 tests.

About plugin

  • Plugin page: gpt-content-gener...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: May 4, 2023
  • Latest release: May 4, 2023
  • Number of updates: 4
  • Update frequency: every 3.8 days
  • Top authors: riteshjain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /208 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.13MB] [CPU: ▼7.88ms] Passed 4 tests

Analyzing server-side resources used by GPT Content Generator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0540.57 ▼7.40
Dashboard /wp-admin3.36 ▲0.0651.65 ▲0.61
Posts /wp-admin/edit.php3.48 ▲0.1250.56 ▲1.68
Add New Post /wp-admin/post-new.php5.19 ▼0.6971.72 ▼26.41
Media Library /wp-admin/upload.php3.29 ▲0.0637.91 ▲2.88
Wp OpenAI /wp-admin/options-general.php?page=wpopenai-configkey3.2634.75

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

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

Browser metrics Passed 4 tests

A check of browser resources used by GPT Content Generator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.75 ▼0.611.72 ▼0.4242.88 ▼1.11
Dashboard /wp-admin2,238 ▲534.88 ▼0.02106.49 ▼14.8141.01 ▼5.81
Posts /wp-admin/edit.php2,121 ▲322.19 ▲0.1935.60 ▼1.5234.03 ▼3.42
Add New Post /wp-admin/post-new.php6,303 ▲4,76119.89 ▼3.03840.76 ▲180.1552.18 ▼1.57
Media Library /wp-admin/upload.php1,417 ▲294.24 ▲0.01106.20 ▲4.6644.56 ▲2.66
Wp OpenAI /wp-admin/options-general.php?page=wpopenai-configkey8862.0524.7737.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/gpt-content-generator/openai.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gpt-content-generator/templates/enterdata.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=wpopenai-configkey
    • > Network (severe)
    wp-content/plugins/gpt-content-generator/assets/js/wpopenai.js?ver=1.0.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: ai, feature image generator, content generator

gpt-content-generator/openai.php 85% from 13 tests

"GPT Content Generator" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 198 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("gpt-content-generator.php" instead of "openai.php")

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
There were no executable files found in this plugin554 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP57429335
CSS110105
JavaScript13166
Markdown121047
SVG1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods9100.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.12MB with 0.05MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/blue-dark-logo.png112.49KB55.68KB▼ 50.50%
assets/images/logowhite.png6.83KB3.92KB▼ 42.68%