83% ai-addons-for-elementor

Code Review | Elementor Addons AI Elements

WordPress plugin Elementor Addons AI Elements scored83%from 54 tests.

About plugin

  • Plugin page: ai-addons-for-ele...
  • Plugin version: 1.4.6
  • PHP compatiblity: 5.7+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.3.1
  • WordPress version: 6.3.1
  • First release: May 17, 2023
  • Latest release: Oct 4, 2023
  • Number of updates: 20
  • Update frequency: every 7.4 days
  • Top authors: aiwp (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /1,946 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.83ms] Passed 4 tests

A check of server-side resources used by Elementor Addons AI Elements
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.08 ▲3.68
Dashboard /wp-admin3.33 ▼0.0143.00 ▼17.77
Posts /wp-admin/edit.php3.38 ▲0.0246.56 ▲2.12
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.65 ▲0.67
Media Library /wp-admin/upload.php3.26 ▲0.0237.76 ▲3.89

Server storage [IO: ▲4.13MB] [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: 226 new files
Database: no new tables, 8 new options
New WordPress options
aiea_shortcodes
theysaidso_admin_options
aiea_modules
can_compress_scripts
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Elementor Addons AI Elements
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲10814.78 ▲0.222.01 ▼0.0343.99 ▼2.35
Dashboard /wp-admin2,224 ▲334.84 ▼1.06107.34 ▼5.2641.23 ▼1.68
Posts /wp-admin/edit.php2,106 ▲172.02 ▼0.0341.21 ▲4.0235.92 ▲1.00
Add New Post /wp-admin/post-new.php1,546 ▲2723.20 ▼0.16659.37 ▼31.3863.94 ▲9.75
Media Library /wp-admin/upload.php1,400 ▲184.26 ▲0.0497.90 ▼1.3444.24 ▼3.25

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 8 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • aiea_shortcodes
    • aiea_modules
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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 take a closer look at the following
  • 17× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\add_filter() in wp-content/plugins/ai-addons-for-elementor/includes/ai-gateway.php:60
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-addons-for-elementor/includes/class.ai-ajax-calls.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/ai-addons-for-elementor/core/admin/parts/admin-dhasboard-menu.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/ai-addons-for-elementor/core/mega-menu/cpt.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\add_action() in wp-content/plugins/ai-addons-for-elementor/core/header-footer/class.header-footer.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/ai-addons-for-elementor/core/admin/ai-default.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/ai-addons-for-elementor/core/header-footer/target-rule/target-rules-fields.php:300
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-addons-for-elementor/core/admin/ai-settings.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ai-addons-for-elementor/core/mega-menu/class.module-mega-menu.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Elementor\\add_action() in wp-content/plugins/ai-addons-for-elementor/includes/modules/section.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 86% 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
Attributes that need to be fixed: The official readme.txt might help

ai-addons-for-elementor/ai-addons.php 77% from 13 tests

The main PHP script in "Elementor Addons AI Elements" version 1.4.6 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 181 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("ai-addons-for-elementor.php" instead of "ai-addons.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected64,637 lines of code in 183 files:
LanguageFilesBlank linesComment linesLines of code
PHP703,3673,87335,005
CSS2133730815,581
JavaScript882,5541,51113,648
SVG410403

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please tend to the following items
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 128)
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity25.88
▷ Minimum class complexity1.00
▷ Maximum class complexity235.00
Average method complexity3.66
▷ Minimum method complexity1.00
▷ Maximum method complexity128.00
Code structure
Namespaces2
Interfaces0
Traits1
Classes67
▷ Abstract classes00.00%
▷ Concrete classes67100.00%
▷ Final classes34.48%
Methods630
▷ Static methods589.21%
▷ Public methods52783.65%
▷ Protected methods9715.40%
▷ Private methods60.95%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
8 PNG files occupy 0.30MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
core/admin/assets/img/dashboard-top.png97.46KB34.56KB▼ 64.54%
assets/images/mailchimp.png18.07KB4.87KB▼ 73.04%
assets/images/logo.png5.88KB5.53KB▼ 5.95%
assets/images/bg-logo.png5.07KB2.71KB▼ 46.59%
assets/images/logo-icon-white.png5.02KB3.16KB▼ 36.96%