74% ever-compare

Code Review | Ever Compare - Products Compare Plugin for WooCommerce

WordPress plugin Ever Compare - Products Compare Plugin for WooCommerce scored 74% from 54 tests.

About plugin

  • Plugin page: ever-compare
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 26, 2021
  • Latest release: Aug 1, 2023
  • Number of updates: 24
  • Update frequency: every 38.3 days
  • Top authors: htplugins (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

900+ active / 16,219 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.81MB] [CPU: ▼2.32ms] 75% from 4 tests

An overview of server-side resources used by Ever Compare - Products Compare Plugin for WooCommerce
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 1,558.77ms on /wp-admin/admin.php?page=everrecommendations)
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4349.38 ▼4.85
Dashboard /wp-admin4.25 ▲0.9573.33 ▲0.77
Posts /wp-admin/edit.php4.30 ▲0.9568.98 ▲0.10
Add New Post /wp-admin/post-new.php6.83 ▲0.94110.63 ▼5.29
Media Library /wp-admin/upload.php4.15 ▲0.9352.65 ▲2.15
Recommendations /wp-admin/admin.php?page=everrecommendations8.461,558.77

Server storage [IO: ▲0.68MB] [DB: ▲0.67MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 66 new files
Database: no new tables, 11 new options
New WordPress options
db_upgraded
widget_recent-comments
ever_compare_table_settings_tabs
widget_theysaidso_widget
evercompare_version
ever_compare_style_tabs
can_compress_scripts
ever_compare_settings_tabs
widget_recent-posts
theysaidso_admin_options
...

Browser metrics Passed 4 tests

An overview of browser requirements for Ever Compare - Products Compare Plugin for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,990 ▲19014.70 ▲0.291.43 ▼0.7454.20 ▼0.16
Dashboard /wp-admin2,399 ▲1936.63 ▲0.72132.24 ▼0.7542.35 ▼12.42
Posts /wp-admin/edit.php2,307 ▲2143.56 ▲1.5753.08 ▲1.5133.30 ▼7.96
Add New Post /wp-admin/post-new.php1,563 ▲15223.53 ▲5.59672.31 ▼47.8936.34 ▼19.01
Media Library /wp-admin/upload.php1,446 ▲584.28 ▲0.09109.27 ▼18.8457.20 ▲0.13
Recommendations /wp-admin/admin.php?page=everrecommendations3,0443.4356.65109.51
Settings /wp-admin/admin.php?page=evercompare#settings3,6874.59139.46130.85

Uninstaller [IO: ✅] [DB: ▲0.67MB] 50% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-content/plugins/ever-compare/uninstall.php+13
    Illegal string offset 'compare_page'
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • evercompare_installed
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, 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
  • 5× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/ever-compare/includes/templates/evercompare-count.php:1
    • > PHP Notice
      Undefined variable: empty_compare_text in wp-content/plugins/ever-compare/includes/templates/evercompare-table.php on line 36
    • > PHP Notice
      Undefined variable: return_shop_button in wp-content/plugins/ever-compare/includes/templates/evercompare-table.php on line 40
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/ever-compare/includes/templates/evercompare-button-add.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/ever-compare/includes/templates/evercompare-table.php:45

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, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
5 plugin tags: compare products, product comparison, product compare, compare button, woocommerce compare

ever-compare/ever-compare.php Passed 13 tests

This is the main PHP file of "Ever Compare - Products Compare Plugin for WooCommerce" version 1.2.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
34 characters long description:
WooCommerce Product compare plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin4,352 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP289149673,337
CSS312218638
JavaScript46556302
SVG20036
YAML22034
JSON1005

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity22.47
▷ Minimum class complexity1.00
▷ Maximum class complexity91.00
Average method complexity3.16
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes17
▷ Abstract classes00.00%
▷ Concrete classes17100.00%
▷ Final classes15.88%
Methods164
▷ Static methods2515.24%
▷ Public methods15393.29%
▷ Protected methods10.61%
▷ Private methods106.10%
Functions20
▷ Named functions1785.00%
▷ Anonymous functions315.00%
Constants10
▷ Global constants770.00%
▷ Class constants330.00%
▷ Public constants3100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
20 PNG files occupy 0.22MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) assets/images/extensions/docus-pro.png3.98KB0.00KB▼ 100.00%
assets/images/extensions/htmega-pro.png4.60KB4.78KB0.00%
(invalid) assets/images/extensions/ht-google-place-review.png2.64KB0.00KB▼ 100.00%
assets/images/extensions/ht-slider-addons-pro.png6.41KB4.35KB▼ 32.23%
.wordpress-org/screenshot-3.png70.18KB22.54KB▼ 67.89%