83% ai-content-image-generator

Code Review | AI ChatGPT Content And Image Generator

WordPress plugin AI ChatGPT Content And Image Generator scored83%from 54 tests.

About plugin

  • Plugin page: ai-content-image-...
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 19, 2023
  • Latest release: Mar 28, 2023
  • Number of updates: 4
  • Update frequency: every 9.5 days
  • Top authors: webdzier (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /875 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.26ms] Passed 4 tests

A check of server-side resources used by AI ChatGPT Content And Image Generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.98 ▲0.24
Dashboard /wp-admin3.33 ▼0.0245.96 ▼11.34
Posts /wp-admin/edit.php3.38 ▲0.0248.51 ▲3.52
Add New Post /wp-admin/post-new.php5.93 ▲0.0479.64 ▼13.47
Media Library /wp-admin/upload.php3.25 ▲0.0236.50 ▲4.65
Generate Content /wp-admin/admin.php?page=generator-content3.3137.46
API Settings /wp-admin/admin.php?page=opaigpt-settings3.2732.97
Help /wp-admin/admin.php?page=opaigpt-help3.2731.11
Support /wp-admin/admin.php?page=opaigpt-support3.2627.76
Generate Image /wp-admin/admin.php?page=generator-image3.3030.24
Generate Chat /wp-admin/admin.php?page=generator-chat3.3031.63

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

AI ChatGPT Content And Image Generator: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,855 ▲10913.37 ▼1.001.85 ▲0.1043.89 ▲3.60
Dashboard /wp-admin2,252 ▲604.83 ▼0.12102.96 ▼1.7573.14 ▲32.96
Posts /wp-admin/edit.php2,135 ▲492.01 ▼0.0037.31 ▲4.5033.31 ▼2.35
Add New Post /wp-admin/post-new.php1,715 ▲20124.62 ▲7.20685.65 ▲42.2766.10 ▲13.59
Media Library /wp-admin/upload.php1,434 ▲434.23 ▲0.0395.88 ▼0.5983.74 ▲39.98
Generate Content /wp-admin/admin.php?page=generator-content1,6896.56129.01128.23
API Settings /wp-admin/admin.php?page=opaigpt-settings9172.1924.3735.42
Help /wp-admin/admin.php?page=opaigpt-help8702.2026.9757.04
Support /wp-admin/admin.php?page=opaigpt-support9032.1522.1140.38
Generate Image /wp-admin/admin.php?page=generator-image1,0071.6824.8932.59
Generate Chat /wp-admin/admin.php?page=generator-chat9352.1423.3133.54

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

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 fix the following items
  • 7× 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/ai-content-image-generator/inc/menu-page/chatgpt-support.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ai-content-image-generator/inc/menu-page/content-generate.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ai-content-image-generator/inc/menu-page/generate-chat.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ai-content-image-generator/inc/menu-page/generate-image.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ai-content-image-generator/inc/menu-page/api-key.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-content-image-generator/inc/enqueue.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/ai-content-image-generator/inc/menu-page/chatgpt-help.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 16 tag instead of maximum 10
Please take inspiration from this readme.txt

ai-content-image-generator/ai-chatgpt-content-and-image-generator.php 77% from 13 tests

The main file in "AI ChatGPT Content And Image Generator" v. 1.0.2 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: Name the main plugin file the same as the plugin slug ("ai-content-image-generator.php" instead of "ai-chatgpt-content-and-image-generator.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 899 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected1,791 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10117781,122
CSS292456
JavaScript34635213

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity2.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions20100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/menu-icon/main-logo.png8.62KB2.66KB▼ 69.09%
assets/img/menu-icon/main-menu.png5.16KB1.16KB▼ 77.44%