10% compe-woo-compare-products

Code Review | COMPE - WooCommerce Compare Products

WordPress plugin COMPE - WooCommerce Compare Products scored10%from 54 tests.

About plugin

  • Plugin page: compe-woo-compare...
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 30, 2021
  • Latest release: Sep 5, 2023
  • Number of updates: 12
  • Update frequency: every 53.7 days
  • Top authors: vietmike (91.67%)villatheme (16.67%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /944 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲0.27MB] [CPU: ▼4.74ms] Passed 4 tests

Server-side resources used by COMPE - WooCommerce Compare Products
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2838.35 ▼8.40
Dashboard /wp-admin3.58 ▲0.2747.24 ▼3.43
Posts /wp-admin/edit.php3.69 ▲0.3350.76 ▲1.48
Add New Post /wp-admin/post-new.php6.16 ▲0.2798.96 ▼8.62
Media Library /wp-admin/upload.php3.50 ▲0.2736.83 ▲2.61

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 96 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
wpc_plugin_page_id

Browser metrics Passed 4 tests

This is an overview of browser requirements for COMPE - WooCommerce Compare Products
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7713.25 ▼1.144.70 ▲2.3941.19 ▼11.49
Dashboard /wp-admin2,218 ▲274.85 ▼1.05108.95 ▲3.9442.88 ▼4.74
Posts /wp-admin/edit.php2,098 ▲92.04 ▲0.0541.49 ▲2.2442.59 ▲7.24
Add New Post /wp-admin/post-new.php1,556 ▲3618.55 ▼4.55604.03 ▲5.7559.57 ▲8.64
Media Library /wp-admin/upload.php1,400 ▲124.23 ▲0.0497.37 ▼3.3441.55 ▼2.81

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • wpc_plugin_page_id
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

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
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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: woocommerce compare products plugin, product comparison plugin wordpress, wordpress, woocommerce compare products, woocommerce...

compe-woo-compare-products/compe-woo-compare-products.php Passed 13 tests

The main file in "COMPE - WooCommerce Compare Products" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
52 characters long description:
The effective way to compare product for WooCommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected19,342 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript111,3695267,726
PHP114163195,913
CSS425504153,558
SVG81611,114
HTML1860549
PO File1164227365
Sass140117

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity39.00
▷ Minimum class complexity4.00
▷ Maximum class complexity171.00
Average method complexity4.44
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods123
▷ Static methods10.81%
▷ Public methods11291.06%
▷ Protected methods86.50%
▷ Private methods32.44%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 compressed PNG files occupy 0.04MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/previous.png9.39KB9.37KB0.21%
images/setting.png17.40KB12.11KB▼ 30.41%
images/next.png9.52KB9.50KB0.19%