78% salvador-ai-image-generator

Code Review | Salvador - AI Image Generator

WordPress plugin Salvador - AI Image Generator scored 78% from 54 tests.

About plugin

  • Plugin page: salvador-ai-image...
  • Plugin version: 1.0.11
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-6.1
  • WordPress version: 6.3.1
  • First release: Dec 5, 2022
  • Latest release: Jan 11, 2023
  • Number of updates: 25
  • Update frequency: every 2.1 days
  • Top authors: awcode (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active / 1,588 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.18MB] [CPU: ▼14.23ms] Passed 4 tests

Server-side resources used by Salvador - AI Image Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.82 ▼0.6414.12 ▼25.94
Dashboard /wp-admin3.36 ▲0.0544.77 ▼6.25
Posts /wp-admin/edit.php3.18 ▼0.1828.83 ▼16.91
Add New Post /wp-admin/post-new.php5.96 ▲0.0784.13 ▼7.83
Media Library /wp-admin/upload.php3.28 ▲0.0536.83 ▲2.37

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Salvador - AI Image Generator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,895 ▲14913.67 ▼0.714.79 ▲3.0642.49 ▼1.53
Dashboard /wp-admin2,215 ▲275.97 ▲1.09117.10 ▲9.4037.24 ▼11.18
Posts /wp-admin/edit.php2,101 ▲152.08 ▲0.0756.19 ▲19.9433.89 ▲1.52
Add New Post /wp-admin/post-new.php1,537 ▲323.38 ▲0.23694.16 ▲50.8158.73 ▲1.95
Media Library /wp-admin/upload.php1,421 ▲304.30 ▲0.06109.93 ▲7.1941.46 ▼8.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/salvador-ai-image-generator/public/partials/salvador-public-display.php
    • > /wp-content/plugins/salvador-ai-image-generator/admin/partials/salvador-admin-display.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/salvador-ai-image-generator/admin/js/salvador-admin-js.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

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
4 plugin tags: image generator, dalle, dall-e, ai images

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

The principal PHP file in "Salvador - AI Image Generator" v. 1.0.11 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("salvador-ai-image-generator.php" instead of "salvador.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,248 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP132171,086833
JavaScript158357386
CSS10429

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions6
▷ Named functions6100.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
No PNG images were found in this plugin