84% addonify-compare-products

Code Review | Addonify - Compare Products For WooCommerce

WordPress plugin Addonify - Compare Products For WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: addonify-compare-...
  • Plugin version: 1.1.12
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.4.0
  • WordPress version: 6.3.1
  • First release: Jul 29, 2022
  • Latest release: Nov 9, 2023
  • Number of updates: 18
  • Update frequency: every 26.1 days
  • Top authors: addonify (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /17,379 total downloads

Benchmarks

Plugin footprint 83% from 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.03MB] [CPU: ▼5.97ms] Passed 4 tests

Analyzing server-side resources used by Addonify - Compare Products For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0346.29 ▲2.05
Dashboard /wp-admin3.34 ▲0.0346.06 ▼12.34
Posts /wp-admin/edit.php3.39 ▲0.0347.99 ▲2.53
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.01 ▼12.19
Media Library /wp-admin/upload.php3.26 ▲0.0335.07 ▼1.41

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 72 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
addonify_cp_compare_page

Browser metrics Passed 4 tests

A check of browser resources used by Addonify - Compare Products For WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4214.23 ▼0.111.76 ▼0.3444.75 ▲3.39
Dashboard /wp-admin2,209 ▲295.50 ▼0.1685.03 ▼16.5838.85 ▼5.94
Posts /wp-admin/edit.php2,115 ▲152.02 ▲0.0635.51 ▼3.5634.36 ▼1.72
Add New Post /wp-admin/post-new.php1,537 ▲1123.19 ▼0.04695.56 ▲90.7153.51 ▲3.28
Media Library /wp-admin/upload.php1,417 ▲144.32 ▲0.1199.48 ▼2.0040.54 ▼1.37

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • addonify_cp_compare_page
    • widget_recent-comments

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/addonify-compare-products/public/templates/addonify-compare-products-docker-modal.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/addonify-compare-products/includes/setting-functions/fields/general.php:127
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/addonify-compare-products/includes/setting-functions/settings.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/addonify-compare-products/includes/setting-functions/fields/search-modal.php:107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addonify-compare-products/includes/addonify-compare-products-template-hooks.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/addonify-compare-products/includes/setting-functions/fields/compare-button.php:150
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr__() in wp-content/plugins/addonify-compare-products/public/templates/addonify-compare-products-search-modal.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/addonify-compare-products/includes/setting-functions/fields/floating-compare-bar.php:108
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/addonify-compare-products/includes/setting-functions/fields/custom-css.php:49
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/addonify-compare-products/includes/udp/init.php:26

User-side errors Passed 1 test

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

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
7 plugin tags: products comparison, woocommerce compare, compare products, addonify, woocommerce...

addonify-compare-products/addonify-compare-products.php Passed 13 tests

The primary PHP file in "Addonify - Compare Products For WooCommerce" version 1.1.12 is used by WordPress to initiate all plugin functionality
132 characters long description:
Addonify Compare Products is a WooCommerce extension that allows website visitors to compare multiple products on your online store.

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
Everything looks great! No dangerous files found in this plugin3,549 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
PHP347951,5882,610
Sass122747891
SVG30133
JSON1006
JavaScript5025
CSS4024

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity9.22
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity2.17
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods63
▷ Static methods23.17%
▷ Public methods5282.54%
▷ Protected methods00.00%
▷ Private methods1117.46%
Functions75
▷ Named functions6586.67%
▷ Anonymous functions1013.33%
Constants4
▷ Global constants4100.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
There were not PNG files found in your plugin