83% ayudante-ai

Code Review | Ayudante Model B

WordPress plugin Ayudante Model B scored83%from 54 tests.

About plugin

  • Plugin page: ayudante-ai
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1
  • WordPress version: 6.3.1
  • First release: Nov 28, 2022
  • Latest release: Nov 28, 2022
  • Number of updates: 6
  • Update frequency: every 0.7 days
  • Top authors: oscarssanchez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /821 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.13MB] [CPU: ▼6.37ms] Passed 4 tests

This is a short check of server-side resources used by Ayudante Model B
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1340.00 ▼0.88
Dashboard /wp-admin3.43 ▲0.1352.16 ▼7.31
Posts /wp-admin/edit.php3.54 ▲0.1946.29 ▼5.66
Add New Post /wp-admin/post-new.php6.02 ▲0.1389.38 ▼11.61
Media Library /wp-admin/upload.php3.35 ▲0.1237.78 ▲1.06

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Ayudante Model B
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲5113.74 ▼0.921.70 ▼0.2738.97 ▼4.83
Dashboard /wp-admin2,222 ▲374.86 ▼1.02102.22 ▼19.9741.96 ▼4.74
Posts /wp-admin/edit.php2,111 ▲221.99 ▼0.0638.23 ▼0.4035.51 ▲2.67
Add New Post /wp-admin/post-new.php6,203 ▲4,67019.13 ▼4.05864.90 ▲207.1871.85 ▲19.77
Media Library /wp-admin/upload.php1,407 ▲194.20 ▼0.0296.19 ▼5.5943.76 ▲1.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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

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
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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/ayudante-ai/ayudante-ai.php:21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: images, image creator, artificial intelligence, machine learning

ayudante-ai/ayudante-ai.php 85% from 13 tests

The principal PHP file in "Ayudante Model B" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/lang")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,790 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP18193540971
JSON200564
JavaScript31120204
CSS29051

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity14.00
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods54
▷ Static methods1833.33%
▷ Public methods5296.30%
▷ Protected methods00.00%
▷ Private methods23.70%
Functions11
▷ Named functions763.64%
▷ Anonymous functions436.36%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 2.38MB with 0.84MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
dist/images/imagecreation.png504.84KB498.62KB▼ 1.23%
assets/images/imagecreation.png1,934.07KB600.77KB▼ 68.94%