83% comparis-price-comparison-system-woocommerce

Code Review | Comparis - Price comparison system (WooCommerce)

WordPress plugin Comparis - Price comparison system (WooCommerce) scored83%from 54 tests.

About plugin

  • Plugin page: comparis-price-co...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.0
  • WordPress version: 6.3.1
  • First release: Mar 31, 2015
  • Latest release: Mar 31, 2015
  • Number of updates: 3
  • Update frequency: every 9.3 days
  • Top authors: uouapps (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,658 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼2.04ms] Passed 4 tests

An overview of server-side resources used by Comparis - Price comparison system (WooCommerce)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0539.01 ▼1.93
Dashboard /wp-admin3.36 ▲0.0548.55 ▼4.52
Posts /wp-admin/edit.php3.41 ▲0.0549.60 ▲2.86
Add New Post /wp-admin/post-new.php5.94 ▲0.0587.89 ▼4.55
Media Library /wp-admin/upload.php3.28 ▲0.0543.43 ▲6.92

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Comparis - Price comparison system (WooCommerce)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲6313.63 ▼0.771.95 ▲0.2938.93 ▼1.60
Dashboard /wp-admin2,212 ▲275.83 ▲0.97100.62 ▼8.3041.77 ▼1.20
Posts /wp-admin/edit.php2,101 ▲121.97 ▼0.0340.84 ▲4.1536.68 ▲2.17
Add New Post /wp-admin/post-new.php1,523 ▲417.58 ▼5.50692.70 ▲56.9078.13 ▲18.07
Media Library /wp-admin/upload.php1,397 ▲94.23 ▼0.0092.79 ▼12.3942.49 ▼1.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

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

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
The following issues need your attention
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/comparis-price-comparison-system-woocommerce/templates/taxonomy-brands.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/comparis-price-comparison-system-woocommerce/templates/taxonomy-brand.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/comparis-price-comparison-system-woocommerce/templates/compare-single-product.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_query_var() in wp-content/plugins/comparis-price-comparison-system-woocommerce/templates/taxonomy-product-sub-categories.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comparis-price-comparison-system-woocommerce/includes/ucp-functions.php:80
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/comparis-price-comparison-system-woocommerce/templates/taxonomy-product-categories.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/comparis-price-comparison-system-woocommerce/templates/archive-product.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/comparis-price-comparison-system-woocommerce/templates/taxonomy-product_cat.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (screenshot-1.png), #2 (screenshot-2.png), #3 (screenshot-3.png), #4 (screenshot-4.png)
Please take inspiration from this readme.txt

comparis-price-comparison-system-woocommerce/comparis-plugin.php 85% from 13 tests

This is the main PHP file of "Comparis - Price comparison system (WooCommerce)" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("comparis-price-comparison-system-woocommerce.php" instead of "comparis-plugin.php")

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
There were no executable files found in this plugin15,324 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript124324345,305
CSS8211685,209
PHP601,0881,6433,966
SVG100520
PO File192122223
Markdown136086
JSON10015

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.36
Average class complexity11.28
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes40
▷ Abstract classes00.00%
▷ Concrete classes40100.00%
▷ Final classes00.00%
Methods162
▷ Static methods106.17%
▷ Public methods15595.68%
▷ Protected methods31.85%
▷ Private methods42.47%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
17 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/marker.png3.31KB1.91KB▼ 42.17%
includes/vendor/cuztom/assets/images/jquery-ui/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
includes/vendor/cuztom/assets/images/jquery-ui/ui-icons_222222_256x240.png4.27KB4.11KB▼ 3.78%
includes/vendor/cuztom/assets/images/jquery-ui/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
includes/vendor/cuztom/assets/images/jquery-ui/ui-icons_cd0a0a_256x240.png4.27KB4.11KB▼ 3.78%