89% ai-related-products

Code Review | AI Related Products

WordPress plugin AI Related Products scored89%from 54 tests.

About plugin

  • Plugin page: ai-related-products
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 25, 2023
  • Latest release: Nov 23, 2023
  • Number of updates: 15
  • Update frequency: every 20.2 days
  • Top authors: sharkthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /7,462 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼7.29ms] Passed 4 tests

Analyzing server-side resources used by AI Related Products
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0136.31 ▼5.50
Dashboard /wp-admin3.32 ▼0.0348.20 ▼15.28
Posts /wp-admin/edit.php3.37 ▲0.0148.68 ▲2.04
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.80 ▼10.42
Media Library /wp-admin/upload.php3.24 ▲0.0135.85 ▲3.58

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for AI Related Products
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3314.45 ▲0.321.79 ▼0.0440.17 ▼2.90
Dashboard /wp-admin2,203 ▲235.60 ▼0.0793.79 ▼5.4542.59 ▼4.19
Posts /wp-admin/edit.php2,102 ▲22.03 ▲0.0439.46 ▲0.3937.47 ▲5.25
Add New Post /wp-admin/post-new.php1,531 ▲523.30 ▲0.33624.10 ▲31.2955.49 ▼5.17
Media Library /wp-admin/upload.php1,405 ▲24.28 ▲0.0396.06 ▼0.2840.52 ▼2.08

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_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

ai-related-products/ai-related-products.php 85% from 13 tests

This is the main PHP file of "AI Related Products" version 1.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 492 characters long)
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.0" instead of "5.6")

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin942 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.17
▷ Minimum class complexity2.00
▷ Maximum class complexity17.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
▷ Static methods37.89%
▷ Public methods3694.74%
▷ Protected methods25.26%
▷ Private methods00.00%
▷ Named functions7100.00%
▷ Anonymous functions00.00%
▷ Global constants5100.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 images were found in this plugin