84% ai-image

Code Review | AI Image Generator by ChatGPT

WordPress plugin AI Image Generator by ChatGPT scored84%from 54 tests.

About plugin

  • Plugin page: ai-image
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Sep 16, 2023
  • Latest release: Sep 17, 2023
  • Number of updates: 6
  • Update frequency: every 0.3 days
  • Top authors: bdthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /150 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by AI Image Generator by ChatGPT
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0442.83 ▼3.04
Dashboard /wp-admin3.35 ▲0.0548.99 ▼8.80
Posts /wp-admin/edit.php3.47 ▲0.1148.90 ▼10.13
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.17 ▼11.94
Media Library /wp-admin/upload.php3.28 ▲0.0436.57 ▼2.74
AI Image /wp-admin/options-general.php?page=bdthemes-ai-image-options3.2431.37

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for AI Image Generator by ChatGPT
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.35 ▼0.261.94 ▼0.2943.58 ▼4.62
Dashboard /wp-admin2,199 ▲295.65 ▼0.0291.37 ▼6.3339.02 ▼4.74
Posts /wp-admin/edit.php2,104 ▲72.01 ▲0.0533.50 ▼4.2038.41 ▲0.70
Add New Post /wp-admin/post-new.php6,369 ▲4,84127.80 ▲4.70873.91 ▲144.8962.93 ▲10.11
Media Library /wp-admin/upload.php1,404 ▲74.22 ▼0.0197.18 ▼6.0243.83 ▼2.74
AI Image /wp-admin/options-general.php?page=bdthemes-ai-image-options8012.0224.0026.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

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 no errors were found, 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
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-image/ai-image.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-image/admin/settings.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_CONTROLLER' not found in wp-content/plugins/ai-image/admin/api.php:5

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: image, chatgpt, chatbot, ai, bdthemes...

ai-image/ai-image.php 92% from 13 tests

The main file in "AI Image Generator by ChatGPT" v. 1.0.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:
  • Domain Path: The domain path folder does not exist ("/languages/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,023 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript581130792
PHP42039145
JSON20078
Sass2108
CSS22160

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.67
▷ Minimum class complexity2.00
▷ Maximum class complexity5.00
Average method complexity1.47
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods17
▷ Static methods15.88%
▷ Public methods1694.12%
▷ Protected methods00.00%
▷ Private methods15.88%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected