72% artist-image-generator

Code Review | Artist Image Generator - AI image generation plugin for Wordpress

WordPress plugin Artist Image Generator - AI image generation plugin for Wordpress scored72%from 54 tests.

About plugin

  • Plugin page: artist-image-gene...
  • Plugin version: 1.0.11
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Feb 16, 2023
  • Latest release: Nov 21, 2023
  • Number of updates: 66
  • Update frequency: every 4.2 days
  • Top authors: immolare (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,439 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.32MB] [CPU: ▼4.26ms] Passed 4 tests

A check of server-side resources used by Artist Image Generator - AI image generation plugin for Wordpress
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3639.00 ▼3.90
Dashboard /wp-admin3.66 ▲0.3150.86 ▼11.45
Posts /wp-admin/edit.php3.71 ▲0.3549.31 ▼2.90
Add New Post /wp-admin/post-new.php6.20 ▲0.3199.53 ▲2.68
Media Library /wp-admin/upload.php3.52 ▲0.2937.37 ▲1.20
Image Generator /wp-admin/upload.php?page=artist_image_generator3.5036.67

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 50 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
theysaidso_admin_options
plugin-is-valid
aig-is-valid
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Artist Image Generator - AI image generation plugin for Wordpress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,924 ▲16213.66 ▼0.698.40 ▲6.5836.19 ▼6.56
Dashboard /wp-admin2,243 ▲665.62 ▼0.0290.70 ▼7.9240.90 ▼7.40
Posts /wp-admin/edit.php2,148 ▲481.94 ▼0.0138.53 ▼0.2437.90 ▲3.74
Add New Post /wp-admin/post-new.php1,581 ▲5523.65 ▲0.02618.70 ▼21.3752.36 ▲2.49
Media Library /wp-admin/upload.php1,451 ▲514.22 ▲0.0896.04 ▲1.4839.92 ▼1.20
Image Generator /wp-admin/upload.php?page=artist_image_generator1,1196.3562.3228.07

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
  • Zombie WordPress options detected upon uninstall: 8 options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • plugin-is-valid
    • theysaidso_admin_options
    • db_upgraded
    • aig-is-valid
    • can_compress_scripts

Smoke tests 25% 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 0% 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
Almost there! Just fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/artist-image-generator/public/partials/artist-image-generator-public-display.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/artist-image-generator/admin/partials/main.php:16

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:64749
    fabric.Point is already defined
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:67126
    fabric.Intersection is already defined
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:69328
    fabric.Color is already defined.
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:96433
    fabric.Shadow is already defined.
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:98823
    fabric.StaticCanvas is already defined.
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:209244
    fabric.Line is already defined
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:212138
    fabric.Circle is already defined.
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:214099
    fabric.Triangle is already defined
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:214858
    fabric.Ellipse is already defined.
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:216407
    fabric.Rect is already defined
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:218683
    fabric.Polyline is already defined
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:221518
    fabric.Polygon is already defined
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:222274
    fabric.Path is already defined
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:234510
    fabric.Image is already defined.
    • > GET request to /wp-admin/upload.php?page=artist_image_generator
    • > Console-api (warning) in wp-content/plugins/artist-image-generator/admin/js/artist-image-generator-admin-drawing.js+16:296747
    fabric.Text is already defined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Add a description for screenshot #5 in artist-image-generator/assets to your readme.txt
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

artist-image-generator/artist-image-generator.php Passed 13 tests

The primary PHP file in "Artist Image Generator - AI image generation plugin for Wordpress" version 1.0.11 is used by WordPress to initiate all plugin functionality
92 characters long description:
A Wordpress plugin using DALL·E 2 to create AI generated royality-free images from scratch.

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
Everything looks great! No dangerous files found in this plugin4,151 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP255181,4322,284
Markdown43820872
JavaScript414183687
CSS23525187
JSON300120
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity17.07
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes00.00%
Methods154
▷ Static methods3824.68%
▷ Public methods13688.31%
▷ Protected methods00.00%
▷ Private methods1811.69%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants19
▷ Global constants15.26%
▷ Class constants1894.74%
▷ Public constants18100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin