58% ai-engine

Code Review | AI Engine: Chatbots, Generators, Assistants, GPT 4 and more!

WordPress plugin AI Engine: Chatbots, Generators, Assistants, GPT 4 and more! scored58%from 54 tests.

About plugin

  • Plugin page: ai-engine
  • Plugin version: 2.0.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Dec 27, 2022
  • Latest release: Dec 3, 2023
  • Number of updates: 689
  • Update frequency: every 0.5 days
  • Top authors: TigrouMeow (100%)

Code review

54 tests

User reviews

472 reviews

Install metrics

50,000+ active /1,466,644 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.90MB] [CPU: ▲9.81ms] Passed 4 tests

An overview of server-side resources used by AI Engine: Chatbots, Generators, Assistants, GPT 4 and more!
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.23 ▲0.7741.84 ▲0.44
Dashboard /wp-admin4.29 ▲0.9865.12 ▲14.85
Posts /wp-admin/edit.php4.39 ▲1.0363.86 ▲17.44
Add New Post /wp-admin/post-new.php6.78 ▲0.89109.27 ▲6.49
Media Library /wp-admin/upload.php4.17 ▲0.9452.53 ▲19.77
AI Engine /wp-admin/admin.php?page=mwai_settings4.1645.41
Playground /wp-admin/tools.php?page=mwai_dashboard4.1846.44
Dashboard /wp-admin/admin.php?page=meowapps-main-menu4.3763.93
Generate New /wp-admin/edit.php?page=mwai_content_generator4.1744.04
Generate Content /wp-admin/tools.php?page=mwai_content_generator4.1847.55
Generate Images /wp-admin/tools.php?page=mwai_images_generator4.1844.20

Server storage [IO: ▲3.46MB] [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: 91 new files
Database: 1 new table, 6 new options
New tables
wp_mwai_files
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

AI Engine: Chatbots, Generators, Assistants, GPT 4 and more!: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,225 ▲43823.24 ▲8.532.50 ▲0.5839.48 ▼3.80
Dashboard /wp-admin2,599 ▲41915.33 ▲9.67420.14 ▲322.4340.74 ▼6.54
Posts /wp-admin/edit.php2,550 ▲45015.23 ▲13.29159.25 ▲118.8430.12 ▼6.91
Add New Post /wp-admin/post-new.php6,435 ▲4,90927.37 ▲5.62904.30 ▲284.7239.94 ▼21.03
Media Library /wp-admin/upload.php1,286 ▼11112.18 ▲7.89213.55 ▲113.1145.10 ▼0.60
AI Engine /wp-admin/admin.php?page=mwai_settings1,42312.30226.5860.92
Playground /wp-admin/tools.php?page=mwai_dashboard1,49314.85217.3747.18
Dashboard /wp-admin/admin.php?page=meowapps-main-menu5,71412.45222.8974.91
Generate New /wp-admin/edit.php?page=mwai_content_generator1,34913.35241.1345.72
Generate Content /wp-admin/tools.php?page=mwai_content_generator1,62617.28223.2839.67
Generate Images /wp-admin/tools.php?page=mwai_images_generator1,48816.48221.0141.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/ai-engine/uninstall.php+26
    Undefined index: clean_uninstall
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_mwai_files
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please take a closer look at the following
  • 16× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant MWAI_PATH - assumed 'MWAI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ai-engine/constants/init.php on line 3
    • > PHP Warning
      require_once(MWAI_PATH/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/ai-engine/classes/core.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_MWAI_Query_Base' not found in wp-content/plugins/ai-engine/classes/queries/assistant.php:3
    • > PHP Warning
      Use of undefined constant MWAI_PATH - assumed 'MWAI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ai-engine/classes/init.php on line 52
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_MWAI_Query_Base' not found in wp-content/plugins/ai-engine/classes/queries/transcribe.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_MWAI_Query_Base' not found in wp-content/plugins/ai-engine/classes/queries/text.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'MWAI_PATH/constants/models.php' (include_path='.:/usr/share/php') in wp-content/plugins/ai-engine/constants/init.php on line 3
    • > PHP Warning
      Use of undefined constant MWAI_PATH - assumed 'MWAI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ai-engine/classes/core.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Meow_MWAI_Query_Base' not found in wp-content/plugins/ai-engine/classes/queries/embed.php:3
    • > PHP Warning
      require_once(MWAI_PATH/constants/models.php): failed to open stream: No such file or directory in wp-content/plugins/ai-engine/constants/init.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=meowapps-main-menu
    • > Network (severe)
    https://ps.w.org/ai-seo/assets/icon-256x256.png - Failed to load resource: the server responded with a status of 404 ()

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6, #7 in ai-engine/assets to your readme.txt
The official readme.txt is a good inspiration

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

The entry point to "AI Engine: Chatbots, Generators, Assistants, GPT 4 and more!" version 2.0.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 160 characters long)

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 plugin13,211 lines of code in 83 files:
LanguageFilesBlank linesComment linesLines of code
PHP471,3021,1108,576
JavaScript616111,592
CSS3269111,416
Sass6255141,249
JSON400202
SVG1501106
Markdown132054
XML10016

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity34.32
▷ Minimum class complexity1.00
▷ Maximum class complexity186.00
Average method complexity3.57
▷ Minimum method complexity1.00
▷ Maximum method complexity38.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes37
▷ Abstract classes00.00%
▷ Concrete classes37100.00%
▷ Final classes00.00%
Methods452
▷ Static methods5211.50%
▷ Public methods38384.73%
▷ Protected methods5612.39%
▷ Private methods132.88%
Functions34
▷ Named functions411.76%
▷ Anonymous functions3088.24%
Constants25
▷ Global constants2496.00%
▷ Class constants14.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/wand.png2.87KB2.10KB▼ 26.86%