83% woocommerce-products-quick-view

Code Review | Products Quick View for WooCommerce

WordPress plugin Products Quick View for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-produ...
  • Plugin version: 2.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Aug 20, 2013
  • Latest release: Nov 23, 2023
  • Number of updates: 132
  • Update frequency: every 28.5 days
  • Top authors: a3rev (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

100+ active /63,882 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲2.46MB] [CPU: ▲6.86ms] Passed 4 tests

An overview of server-side resources used by Products Quick View for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.48 ▲2.0236.09 ▼0.98
Dashboard /wp-admin5.97 ▲2.6264.87 ▲5.93
Posts /wp-admin/edit.php6.02 ▲2.6658.13 ▲11.95
Add New Post /wp-admin/post-new.php8.49 ▲2.60104.19 ▲15.36
Media Library /wp-admin/upload.php5.83 ▲2.6048.33 ▲10.53
Quick View /wp-admin/admin.php?page=wc-quick-view5.8756.72

Server storage [IO: ▲3.12MB] [DB: ▲0.07MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 243 new files
Database: no new tables, 50 new options
New WordPress options
can_compress_scripts
quick_view_ultimate_colorbox_center_on_scroll
quick_view_ultimate_popup_content
wc_quick_view_ultimate_version
quick_view_ultimate_under_image_bt_font
quick_view_ultimate_on_hover_bt_alink
quick_view_template_global_settings
quick_view_ultimate_under_image_bt_text
wc_quick_view_lite_version
quick_view_ultimate_under_image_bt_bg_to
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Products Quick View for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,449 ▼29814.30 ▼0.050.55 ▼1.0718.63 ▼19.37
Dashboard /wp-admin2,196 ▲195.54 ▼0.1386.56 ▼11.4638.39 ▼3.34
Posts /wp-admin/edit.php2,107 ▲71.97 ▼0.0339.70 ▲1.0229.94 ▼8.03
Add New Post /wp-admin/post-new.php1,530 ▼723.09 ▼0.05638.07 ▲7.0364.82 ▲14.53
Media Library /wp-admin/upload.php1,407 ▲104.15 ▼0.0497.52 ▼2.1342.86 ▲2.09
Quick View /wp-admin/admin.php?page=wc-quick-view1,5793.6975.8992.43

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 49 options in the database
    • quick_view_ultimate_under_image_bt_padding_tb
    • quick_view_ultimate_enable
    • quick_view_ultimate_popup_tool
    • quick_view_ultimate_colorbox_speed
    • quick_view_ultimate_colorbox_popup_width
    • quick_view_ultimate_on_hover_bt_bg
    • quick_view_ultimate_under_image_bt_bg
    • quick_view_ultimate_under_image_bt_border
    • quick_view_ultimate_colorbox_overlay_color
    • quick_view_ultimate_prettyphoto_speed
    • ...

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
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 applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 65× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-products-quick-view/templates/customized_gallery_style.php on line 23
    • > PHP Notice
      Undefined variable: title_padding_top in wp-content/plugins/woocommerce-products-quick-view/templates/customized_popup_style.php on line 84
    • > PHP Notice
      Undefined variable: title_alignment in wp-content/plugins/woocommerce-products-quick-view/templates/customized_popup_style.php on line 80
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-products-quick-view/templates/customized_gallery_style.php on line 33
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woocommerce-products-quick-view/classes/class-quick-view-dynamic-gallery.php:15
    • > PHP Fatal error
      Uncaught Error: Call to a member function generate_shadow_css() on null in wp-content/plugins/woocommerce-products-quick-view/templates/customized_popup_style.php:88
    • > PHP Notice
      Undefined variable: control_transition in wp-content/plugins/woocommerce-products-quick-view/templates/customized_popup_style.php on line 40
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-products-quick-view/templates/customized_gallery_style.php on line 30
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/woocommerce-products-quick-view/templates/customized_popup_style.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/woocommerce-products-quick-view/templates/customized_gallery_style.php on line 35

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: woocommerce, woocommerce products quick view, woocommerce quick view, quick view

woocommerce-products-quick-view/woocommerce-quick-view-ultimate.php 85% from 13 tests

The main PHP file in "Products Quick View for WooCommerce" ver. 2.3.1 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 199 characters long)
  • Main file name: The principal plugin file should be the same as the plugin slug ("woocommerce-products-quick-view.php" instead of "woocommerce-quick-view-ultimate.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin49,743 lines of code in 136 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript352,7711,75415,792
PHP623,2723,23115,029
JSON10013,203
CSS273721953,942
LESS57526642
PO File1249480543
Sass1881516
SVG33047
HTML12029

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 410)
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity41.27
▷ Minimum class complexity1.00
▷ Maximum class complexity801.00
Average method complexity5.10
▷ Minimum method complexity1.00
▷ Maximum method complexity410.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes52
▷ Abstract classes00.00%
▷ Concrete classes52100.00%
▷ Final classes00.00%
Methods512
▷ Static methods163.12%
▷ Public methods34366.99%
▷ Protected methods14127.54%
▷ Private methods285.47%
Functions25
▷ Named functions2392.00%
▷ Anonymous functions28.00%
Constants21
▷ Global constants1676.19%
▷ Class constants523.81%
▷ Public constants5100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
77 PNG files occupy 0.54MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/free-wordpress-plugins.png79.93KB29.22KB▼ 63.44%
admin/assets/images/slider-bg-disable.png1.04KB0.14KB▼ 86.45%
assets/js/fancybox/images/fancybox/fancybox.png14.93KB8.47KB▼ 43.29%
admin/assets/images/slider-container-start-disable.png1.53KB0.56KB▼ 63.40%
admin/assets/images/play_video.png17.30KB9.38KB▼ 45.75%