84% product-compare-for-woocommerce

Code Review | Product Compare for WooCommerce

WordPress plugin Product Compare for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: product-compare-f...
  • Plugin version: 0.2
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 28, 2021
  • Latest release: Sep 29, 2022
  • Number of updates: 6
  • Update frequency: every 61.0 days
  • Top authors: codelizarplugs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /319 total downloads

Benchmarks

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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.04MB] [CPU: ▼16.68ms] Passed 4 tests

Analyzing server-side resources used by Product Compare for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0323.21 ▼13.58
Dashboard /wp-admin3.37 ▲0.0748.96 ▼0.15
Posts /wp-admin/edit.php3.48 ▲0.1347.33 ▼13.94
Add New Post /wp-admin/post-new.php5.95 ▲0.0685.29 ▼36.14
Media Library /wp-admin/upload.php3.29 ▲0.0633.72 ▼3.05

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 46 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Product Compare for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,471 ▼26413.49 ▼0.890.51 ▼1.0917.07 ▼27.35
Dashboard /wp-admin2,209 ▲205.84 ▲0.93100.15 ▼17.0241.22 ▼2.61
Posts /wp-admin/edit.php2,098 ▲92.05 ▲0.0439.41 ▼2.1635.81 ▲0.05
Add New Post /wp-admin/post-new.php1,539 ▲2023.34 ▲0.22591.15 ▲1.1558.21 ▲7.37
Media Library /wp-admin/upload.php1,394 ▲94.25 ▲0.03102.10 ▲4.5345.36 ▲5.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 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
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/product-compare-for-woocommerce/public/handler/show_compared_products.php
    • > /wp-content/plugins/product-compare-for-woocommerce/admin/class-cdlzr-proco-actions.php

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4 in product-compare-for-woocommerce/assets to your readme.txt
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
The official readme.txt is a good inspiration

product-compare-for-woocommerce/product-compare-for-woocommerce.php Passed 13 tests

"Product Compare for WooCommerce" version 0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
73 characters long description:
The plugin give you the ability to compare the products by their category

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin22,879 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS92,9058313,369
JavaScript82,4101,1148,583
PHP1367155834
PO File119936193

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity5.00
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes111.11%
Methods20
▷ Static methods1680.00%
▷ Public methods1890.00%
▷ Protected methods00.00%
▷ Private methods210.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected