84% imajinn-ai

Code Review | Imajinn - Magical AI Image Generation like DALL·E

WordPress plugin Imajinn - Magical AI Image Generation like DALL·E scored84%from 54 tests.

About plugin

  • Plugin page: imajinn-ai
  • Plugin version: 1.5.4
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Sep 15, 2022
  • Latest release: Oct 26, 2023
  • Number of updates: 27
  • Update frequency: every 15.0 days
  • Top authors: uglyrobot (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /6,671 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.14MB] [CPU: ▼1.14ms] Passed 4 tests

Server-side resources used by Imajinn - Magical AI Image Generation like DALL·E
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1541.09 ▲2.59
Dashboard /wp-admin3.45 ▲0.1449.88 ▲4.81
Posts /wp-admin/edit.php3.56 ▲0.2045.34 ▼4.58
Add New Post /wp-admin/post-new.php6.04 ▲0.1584.46 ▼1.71
Media Library /wp-admin/upload.php3.37 ▲0.1436.14 ▼0.85
Imajinn AI /wp-admin/upload.php?page=imajinn-ai3.3635.67

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Imajinn - Magical AI Image Generation like DALL·E
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.44 ▲0.081.82 ▲0.2644.33 ▲8.51
Dashboard /wp-admin2,202 ▲245.62 ▼0.1085.94 ▼27.7942.79 ▲1.20
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0435.71 ▼3.2732.04 ▼2.19
Add New Post /wp-admin/post-new.php6,370 ▲4,84227.91 ▲5.03797.06 ▲119.3462.38 ▲6.78
Media Library /wp-admin/upload.php1,404 ▲44.28 ▲0.0694.78 ▼18.8841.01 ▼7.91
Imajinn AI /wp-admin/upload.php?page=imajinn-ai1,02911.98277.6040.43

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/imajinn-ai/imajinn-ai.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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
These attributes need your attention:
  • Screenshots: Please add descriptions for these screenshots #2, #3, #4, #5, #6, #7, #8 in imajinn-ai/assets to your readme.txt
You can take inspiration from this readme.txt

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

Analyzing the main PHP file in "Imajinn - Magical AI Image Generation like DALL·E" version 1.5.4
You should first fix the following items:
  • Description: Please keep the plugin description shorter than 140 characters (currently 294 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected482 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4126117424
JSON10034
CSS20015
JavaScript2079

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity58.00
▷ Minimum class complexity58.00
▷ Maximum class complexity58.00
Average method complexity3.04
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods28
▷ Static methods13.57%
▷ Public methods2589.29%
▷ Protected methods00.00%
▷ Private methods310.71%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected