78% webartclub-ai-image-generator

Code Review | WebArtClub AI Image Generator

WordPress plugin WebArtClub AI Image Generator scored78%from 54 tests.

About plugin

  • Plugin page: webartclub-ai-ima...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Apr 19, 2023
  • Latest release: Apr 19, 2023
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: webartclub (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /383 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.27ms] 75% from 4 tests

This is a short check of server-side resources used by WebArtClub AI Image Generator
It is recommended to improve the following
  • CPU: You should keep total CPU usage under 500.00ms (currently 1,009.44ms on /wp-admin/edit.php?post_type=ai&page=webartclub)
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.99 ▼4.13
Dashboard /wp-admin3.35 ▲0.0448.51 ▼6.97
Posts /wp-admin/edit.php3.40 ▲0.0451.35 ▼2.98
Add New Post /wp-admin/post-new.php6.00 ▲0.1292.64 ▼6.99
Media Library /wp-admin/upload.php3.27 ▲0.0436.03 ▲0.11
Webartclub Settings /wp-admin/edit.php?post_type=ai&page=webartclub3.251,009.44
Add New /wp-admin/post-new.php?post_type=ai3.3245.07
All AI Images /wp-admin/edit.php?post_type=ai3.3135.42

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 23 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

WebArtClub AI Image Generator: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲15013.63 ▼1.135.11 ▲2.9342.56 ▼2.81
Dashboard /wp-admin2,241 ▲535.86 ▲0.96111.51 ▼4.1542.32 ▼4.43
Posts /wp-admin/edit.php2,124 ▲351.99 ▼0.0340.12 ▲3.2734.27 ▲0.66
Add New Post /wp-admin/post-new.php1,554 ▲2018.37 ▼4.75593.80 ▼41.6149.55 ▼2.89
Media Library /wp-admin/upload.php1,423 ▲354.24 ▲0.0497.50 ▼9.9346.65 ▲2.56
Webartclub Settings /wp-admin/edit.php?post_type=ai&page=webartclub9082.0723.7226.78
Add New /wp-admin/post-new.php?post_type=ai1,6223.5273.1033.55
All AI Images /wp-admin/edit.php?post_type=ai1,0941.9631.4930.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/webartclub-ai-image-generator/admin/partials/webart-generator-admin-display.php
    • > /wp-content/plugins/webartclub-ai-image-generator/public/partials/webart-generator-public-display.php
  • 1× 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/webartclub-ai-image-generator/public/class-webart-generator-public.php:108

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: api, text to image, ai generated image, ai, text2image

webartclub-ai-image-generator/webart-generator.php 85% from 13 tests

The main file in "WebArtClub AI Image Generator" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("webartclub-ai-image-generator.php" instead of "webart-generator.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin745 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12260564730
CSS2289
JavaScript24546

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity3.62
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin