68% hmh-woocommerce-quick-view

Code Review | Product Quick View for WooCommerce

WordPress plugin Product Quick View for WooCommerce scored68%from 54 tests.

About plugin

  • Plugin page: hmh-woocommerce-q...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2
  • WordPress version: 6.3.1
  • First release: Aug 27, 2019
  • Latest release: Aug 27, 2019
  • Number of updates: 3
  • Update frequency: every 46.4 days
  • Top authors: hameha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /525 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.85MB] [CPU: ▼36.04ms] Passed 4 tests

This is a short check of server-side resources used by Product Quick View for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.51 ▼4.62
Dashboard /wp-admin3.09 ▼0.2126.07 ▼28.44
Posts /wp-admin/edit.php3.09 ▼0.2625.22 ▼28.16
Add New Post /wp-admin/post-new.php3.09 ▼2.7927.53 ▼70.16
Media Library /wp-admin/upload.php3.09 ▼0.1422.41 ▼17.40

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 133 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Product Quick View for WooCommerce
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,935 ▲17413.72 ▼0.717.48 ▲5.6838.93 ▼6.20
Dashboard /wp-admin2,237 ▲605.77 ▲0.1390.10 ▼1.2140.94 ▼6.25
Posts /wp-admin/edit.php2,151 ▲512.33 ▲0.3043.37 ▲6.3834.08 ▼1.86
Add New Post /wp-admin/post-new.php1,566 ▲2123.40 ▲0.12688.64 ▲21.8842.80 ▼12.61
Media Library /wp-admin/upload.php1,446 ▲494.50 ▲0.23101.29 ▼13.7140.59 ▼9.70

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/hmh-woocommerce-quick-view/includes/admin/options.class.php+59
    Undefined index: icon
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/fields/checkbox.view.php
    • > /wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/fields/hidden.view.php
    • > /wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/index.php
  • 58× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: dependency in wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/fields/toggle.view.php on line 1
    • > PHP Notice
      Undefined variable: dependency in wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/fields/dropdown.view.php on line 1
    • > PHP Notice
      Undefined variable: dependency in wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/fields/multi_select.view.php on line 1
    • > PHP Notice
      Undefined variable: dependency in wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/fields/toggle.view.php on line 1
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/fields/checkbox.view.php on line 8
    • > PHP Notice
      Undefined variable: dependency in wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/fields/multi_select.view.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/fields/tags.view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/fields/attach.view.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/fields/number.view.php:3
    • > PHP Notice
      Undefined variable: dependency in wp-content/plugins/hmh-woocommerce-quick-view/bestbugcore/classes/fields/colorpicker.view.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Screenshots: Add an image for screenshot #1 (Add Product)
The official readme.txt might help

hmh-woocommerce-quick-view/index.php 85% from 13 tests

The entry point to "Product Quick View for WooCommerce" version 1.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("hmh-woocommerce-quick-view.php" instead of "index.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
Success! There were no dangerous files found in this plugin14,800 lines of code in 105 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript229396865,166
PHP397795314,772
CSS18381673,297
Sass2615631,565

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity30.42
▷ Minimum class complexity2.00
▷ Maximum class complexity246.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods199
▷ Static methods147.04%
▷ Public methods18492.46%
▷ Protected methods157.54%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants39
▷ Global constants39100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 PNG files occupy 0.24MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
bestbugcore/assets/admin/images/logo.png1.87KB0.57KB▼ 69.83%
assets/screenshot-1.png77.39KB21.01KB▼ 72.86%
bestbugcore/assets/admin/images/sort_asc.png0.16KB0.25KB0.00%
bestbugcore/assets/admin/libs/chosen/chosen-sprite.png0.53KB0.88KB0.00%
assets/screenshot-2.png77.45KB23.41KB▼ 69.77%