99% related-products-slider-for-woocommerce

Code Review | Related Products Slider for WooCommerce

WordPress plugin Related Products Slider for WooCommerce scored 99% from 53 tests.

About plugin

  • Plugin page: related-products-...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.0
  • WordPress version: 5.8.1
  • First release: Feb 15, 2017
  • Latest release: Feb 16, 2017
  • Number of updates: 16
  • Update frequency: every 0.1 days
  • Top authors: wooteam (100%)

Code review

53 tests

User reviews

1 review

Install metrics

90+ active / 1,907 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼260.08ms] Passed 4 tests

Server-side resources used by Related Products Slider for WooCommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.91 ▲0.1933.21 ▲13.03
Dashboard /wp-admin3.13 ▲0.0742.40 ▼0.90
Posts /wp-admin/edit.php3.18 ▲0.0744.94 ▲1.58
Add New Post /wp-admin/post-new.php5.49 ▲0.0688.98 ▼1,037.61
Media Library /wp-admin/upload.php3.07 ▲0.0635.59 ▼3.39
RP Related Products /wp-admin/admin.php?page=rp-related-products3.0433.42

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Related Products Slider for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,820 ▲21417.04 ▲1.2110.96 ▲3.4850.41 ▲5.96
Dashboard /wp-admin2,965 ▲1126.69 ▲0.83133.39 ▼0.86102.07 ▼2.01
Posts /wp-admin/edit.php2,738 ▲323.00 ▲0.3165.48 ▼1.26109.16 ▲17.48
Add New Post /wp-admin/post-new.php1,874 ▼16419.20 ▼0.33369.27 ▼11.80121.01 ▲22.26
Media Library /wp-admin/upload.php1,745 ▼305.14 ▲0.12139.90 ▼7.65112.68 ▲1.56
RP Related Products /wp-admin/admin.php?page=rp-related-products1,5132.5767.7461.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled completely, with no zombie files or tables

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

related-products-slider-for-woocommerce/related-products-slider-for-woocommerce.php Passed 13 tests

The main file in "Related Products Slider for WooCommerce" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
Display related products with Slider on every single 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
Everything looks great! No dangerous files found in this plugin2,326 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3206181,300
CSS310849609
PHP511536401
SVG10016

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/grabbing.png0.11KB0.14KB0.00%
assets/images/banner-1.png11.21KB4.26KB▼ 61.99%