90% woo-custom-related-products

Code Review | WPC Custom Related Products for WooCommerce

WordPress plugin WPC Custom Related Products for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: woo-custom-relate...
  • Plugin version: 1.3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.2.0
  • WordPress version: 6.3.1
  • First release: Jul 29, 2016
  • Latest release: Jul 14, 2023
  • Number of updates: 65
  • Update frequency: every 39.1 days
  • Top authors: wpcodelibrary (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

6,000+ active /37,163 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
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼16.46ms] Passed 4 tests

A check of server-side resources used by WPC Custom Related Products for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1042.63 ▼2.35
Dashboard /wp-admin3.40 ▲0.0557.20 ▼9.80
Posts /wp-admin/edit.php3.51 ▲0.1653.41 ▼25.68
Add New Post /wp-admin/post-new.php6.00 ▲0.1192.06 ▼28.01
Media Library /wp-admin/upload.php3.32 ▲0.0946.99 ▲7.93
Welcome To WooCommerce Custom Related Products /wp-admin/index.php?page=wcrp-about3.2937.11

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
wcrp_version
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by WPC Custom Related Products for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲9013.46 ▼0.898.66 ▲6.6744.20 ▲4.30
Dashboard /wp-admin2,202 ▲255.60 ▲0.0086.71 ▼7.7041.39 ▼0.69
Posts /wp-admin/edit.php2,104 ▲41.99 ▼0.0138.82 ▼1.2937.46 ▲0.36
Add New Post /wp-admin/post-new.php1,530 ▲423.35 ▼0.12663.93 ▼27.1561.77 ▲9.54
Media Library /wp-admin/upload.php1,398 ▼24.20 ▲0.0399.40 ▼4.9744.31 ▼2.53
Welcome To WooCommerce Custom Related Products /wp-admin/index.php?page=wcrp-about8611.9922.1637.39

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • wcrp_version

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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 shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
You can take inspiration from this readme.txt

woo-custom-related-products/woo-custom-related-products.php Passed 13 tests

This is the main PHP file of "WPC Custom Related Products for WooCommerce" version 1.3.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
109 characters long description:
WPC Custom Related Products for WooCommerce allows you to choose related products for the particular product.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected424 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13142423397
CSS20421
JavaScript2406

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity2.03
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods34
▷ Static methods25.88%
▷ Public methods2985.29%
▷ Protected methods00.00%
▷ Private methods514.71%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants375.00%
▷ Class constants125.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin