83% custom-related-products-wc

Code Review | Custom Related Products and Quickview for WC

WordPress plugin Custom Related Products and Quickview for WC scored 83% from 54 tests.

About plugin

  • Plugin page: custom-related-pr...
  • Plugin version: 2.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7.2
  • WordPress version: 5.8.1
  • First release: Jun 21, 2021
  • Latest release: Jun 21, 2021
  • Number of updates: 5
  • Update frequency: every 1.4 days
  • Top authors: wpevince (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 88 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.24MB] [CPU: ▼139.74ms] Passed 4 tests

Server-side resources used by Custom Related Products and Quickview for WC
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.95 ▲0.2333.79 ▲11.19
Dashboard /wp-admin3.35 ▲0.2954.74 ▲7.42
Posts /wp-admin/edit.php3.40 ▲0.2946.71 ▲1.21
Add New Post /wp-admin/post-new.php5.65 ▲0.2285.84 ▼572.54
Media Library /wp-admin/upload.php3.23 ▲0.2337.84 ▲4.95
Custom Related Products Setting /wp-admin/admin.php?page=evince-quick-view-settings3.2038.87

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 33 new files
Database: no new tables, 1 new option
New WordPress options
ecrp_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Custom Related Products and Quickview for WC
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,426 ▼17016.50 ▲1.0011.90 ▲3.0311.09 ▼32.70
Dashboard /wp-admin2,999 ▲686.65 ▲0.71146.86 ▲5.75113.41 ▼3.34
Posts /wp-admin/edit.php2,774 ▲382.76 ▲0.0672.22 ▲8.43105.40 ▲9.74
Add New Post /wp-admin/post-new.php1,521 ▲2318.85 ▼0.02393.25 ▲17.23107.07 ▼15.04
Media Library /wp-admin/upload.php1,839 ▲325.19 ▲0.17131.41 ▼49.86120.11 ▲1.12
Custom Related Products Setting /wp-admin/admin.php?page=evince-quick-view-settings2,2803.45102.09140.92

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 1 option
    • ecrp_version

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
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=evince-quick-view-settings
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=5.8.1+1:283
    wpColorPickerL10n.defaultLabel is deprecated since version 5.5.0! Use wp.i18n instead.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=evince-quick-view-settings
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=5.8.1+1:283
    wpColorPickerL10n.pick is deprecated since version 5.5.0! Use wp.i18n instead.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=evince-quick-view-settings
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=5.8.1+1:283
    wpColorPickerL10n.defaultString is deprecated since version 5.5.0! Use wp.i18n instead.
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=evince-quick-view-settings
    • > Console-api (warning) in wp-admin/js/common.min.js?ver=5.8.1+1:283
    wpColorPickerL10n.defaultAriaLabel is deprecated since version 5.5.0! Use wp.i18n instead.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
You can take inspiration from this readme.txt

custom-related-products-wc/evdpl-custom-related-products.php 85% from 13 tests

The main PHP script in "Custom Related Products and Quickview for WC" version 2.1.0 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 264 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("custom-related-products-wc.php" instead of "evdpl-custom-related-products.php")

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
There were no executable files found in this plugin1,761 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP11238344994
JavaScript677157424
CSS6129343

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity16.44
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods55
▷ Static methods610.91%
▷ Public methods5192.73%
▷ Protected methods00.00%
▷ Private methods47.27%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants685.71%
▷ Class constants114.29%
▷ 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
public/images/arrow-point.png4.58KB2.18KB▼ 52.33%