73% productive-commerce

Code Review | WooCommerce Wishlist, Comparison, Quick View and MiniCart

WordPress plugin WooCommerce Wishlist, Comparison, Quick View and MiniCart scored73%from 54 tests.

About plugin

  • Plugin page: productive-commerce
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Jan 20, 2023
  • Latest release: Nov 23, 2023
  • Number of updates: 67
  • Update frequency: every 4.6 days
  • Top authors: productiveminds (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /1,854 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲2.35MB] [CPU: ▲8.66ms] Passed 4 tests

A check of server-side resources used by WooCommerce Wishlist, Comparison, Quick View and MiniCart
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /5.76 ▲2.3056.75 ▲13.74
Dashboard /wp-admin5.67 ▲2.3758.24 ▲7.41
Posts /wp-admin/edit.php5.78 ▲2.4260.84 ▲10.75
Add New Post /wp-admin/post-new.php8.25 ▲2.3795.77 ▲2.72
Media Library /wp-admin/upload.php5.59 ▲2.3753.06 ▲19.91
Productive... /wp-admin/admin.php?page=productive_options_overview5.5345.26
Global Settings /wp-admin/admin.php?page=productive_global_options_submenu5.5645.82
Productive Commerce /wp-admin/admin.php?page=productive_commerce_options_submenu5.5645.19

Server storage [IO: ▲2.11MB] [DB: ▲0.02MB] Passed 3 tests

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 78 new files
Database: 4 new tables, 17 new options
New tables
wp_productive_compare
wp_productive_wishlist_product
wp_productive_wishlist
wp_productive_compare_product
New WordPress options
theysaidso_admin_options
productive_commerce_section_wishlist_options
productive_global_section_popup_options
productive_global_section_slider_options
productive_global_section_grid_options
productive_commerce_section_compare_options
widget_recent-comments
db_upgraded
can_compress_scripts
productive_commerce_section_integration_options
...

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Wishlist, Comparison, Quick View and MiniCart
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,075 ▲31313.74 ▼0.6018.14 ▲16.4435.90 ▼8.84
Dashboard /wp-admin2,222 ▲455.63 ▲0.0095.06 ▼3.1943.43 ▲2.26
Posts /wp-admin/edit.php2,127 ▲272.03 ▲0.0939.02 ▼2.9936.23 ▼1.70
Add New Post /wp-admin/post-new.php1,548 ▲2223.00 ▼0.16621.45 ▼51.2664.66 ▲5.70
Media Library /wp-admin/upload.php1,424 ▲304.24 ▲0.0499.91 ▲2.9040.67 ▼2.05
Productive... /wp-admin/admin.php?page=productive_options_overview1,1841.8729.6850.04
Global Settings /wp-admin/admin.php?page=productive_global_options_submenu1,4171.9428.6038.15
Productive Commerce /wp-admin/admin.php?page=productive_commerce_options_submenu1,1931.8729.3646.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.02MB] 50% 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
  • Zombie tables were found after uninstall: 4 tables
    • wp_productive_wishlist
    • wp_productive_compare_product
    • wp_productive_compare
    • wp_productive_wishlist_product
  • Zombie WordPress options were found after uninstall: 16 options
    • db_upgraded
    • widget_theysaidso_widget
    • productive_commerce_section_compare_options
    • productive_global_section_sharing_options
    • productive_global_section_slider_options
    • productive_global_section_grid_options
    • productive_global_section_misc_options
    • widget_recent-comments
    • theysaidso_admin_options
    • productive_commerce_section_wishlist_options
    • ...

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 everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 18× 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 add_action() in wp-content/plugins/productive-commerce/includes/standard/user-engagements-loop.php:70
    • > PHP Warning
      require(PRODUCTIVE_COMMERCE_PLUGIN_PATHadmin/common/options/partials/part-section-integration.php): failed to open stream: No such file or directory in wp-content/plugins/productive-commerce/admin/standard/options/partials/section-integration.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'PRODUCTIVE_COMMERCE_PLUGIN_PATHincludes/common/db/db_install.php' (include_path='.:/usr/share/php') in wp-content/plugins/productive-commerce/includes/standard/functions.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/productive-commerce/admin/common/options/partials/section-wishlist.php:1773
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/productive-commerce/admin/common/options/global/productiveminds-icons.php:463
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/productive-commerce/includes/common/module/page-compare.php:132
    • > PHP Warning
      Use of undefined constant PRODUCTIVE_COMMERCE_PLUGIN_PATH - assumed 'PRODUCTIVE_COMMERCE_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/productive-commerce/includes/standard/functions.php on line 7
    • > PHP Warning
      Use of undefined constant PRODUCTIVE_COMMERCE_PLUGIN_PATH - assumed 'PRODUCTIVE_COMMERCE_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/productive-commerce/admin/standard/options/partials/section-integration.php on line 8
    • > PHP Warning
      require_once(PRODUCTIVE_COMMERCE_PLUGIN_PATHincludes/common/db/db_install.php): failed to open stream: No such file or directory in wp-content/plugins/productive-commerce/includes/standard/functions.php on line 7
    • > PHP Fatal error
      require(): Failed opening required 'PRODUCTIVE_COMMERCE_PLUGIN_PATHadmin/common/options/partials/part-section-integration.php' (include_path='.:/usr/share/php') in wp-content/plugins/productive-commerce/admin/standard/options/partials/section-integration.php on line 8

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 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid url: ""
  • Tags: There are too many tags (18 tag instead of maximum 10)
Please take inspiration from this readme.txt

productive-commerce/productive-commerce.php 92% from 13 tests

Analyzing the main PHP file in "WooCommerce Wishlist, Comparison, Quick View and MiniCart" version 1.1.1
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 293 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin20,508 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP481,6291,29013,311
CSS5411125,224
JavaScript3175781,788
XML100185

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.20
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions590
▷ Named functions590100.00%
▷ Anonymous functions00.00%
Constants163
▷ Global constants163100.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
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/productivemedia/icons/close.png3.46KB1.76KB▼ 49.15%
public/images/productivemedia/icons/close-jagged.png4.12KB2.46KB▼ 40.23%
public/images/productivemedia/icons/check.png3.05KB1.70KB▼ 44.22%
public/images/productivemedia/icons/close-circle.png6.21KB2.75KB▼ 55.79%
public/images/productivemedia/icons/check-jagged.png3.41KB1.91KB▼ 43.99%