83% wc-products-quick-view

Code Review | WC Products Quick View

WordPress plugin WC Products Quick View scored83%from 54 tests.

About plugin

  • Plugin page: wc-products-quick...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.3
  • WordPress version: 6.3.1
  • First release: Aug 4, 2015
  • Latest release: Aug 17, 2015
  • Number of updates: 7
  • Update frequency: every 1.9 days
  • Top authors: shamimmoeen (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active /2,341 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼5.84ms] Passed 4 tests

An overview of server-side resources used by WC Products Quick View
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.27 ▲0.07
Dashboard /wp-admin3.31 ▼0.0449.41 ▼11.96
Posts /wp-admin/edit.php3.36 ▲0.0051.24 ▲2.68
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.65 ▼8.83
Media Library /wp-admin/upload.php3.24 ▲0.0036.06 ▼2.64

Server storage [IO: ▲0.42MB] [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: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for WC Products Quick View
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.111.83 ▲0.0644.87 ▲0.73
Dashboard /wp-admin2,198 ▲215.65 ▼0.0791.08 ▲1.0343.01 ▲2.78
Posts /wp-admin/edit.php2,100 ▼02.03 ▼0.0240.35 ▲2.5334.95 ▼0.47
Add New Post /wp-admin/post-new.php1,526 ▼1617.59 ▼5.63665.31 ▼10.0456.94 ▼3.33
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.0096.27 ▼16.7542.28 ▼7.19

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 6× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wc-products-quick-view/templates/wpqv-button.php:17
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/wc-products-quick-view/templates/wpqv-button.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-products-quick-view/class.wc-quick-view.php:13
    • > PHP Notice
      Undefined variable: button_class in wp-content/plugins/wc-products-quick-view/templates/wpqv-button.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wc-products-quick-view/templates/wpqv-product.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wc-products-quick-view/functions.php:39

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)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (Quick View button on products loop), #2 (Product Details in lightbox)
Please take inspiration from this readme.txt

wc-products-quick-view/init.php 85% from 13 tests

The main PHP file in "WC Products Quick View" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wc-products-quick-view.php" instead of "init.php")

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
Everything looks great! No dangerous files found in this plugin913 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
CSS1683328
JavaScript310638301
PHP55268225
Markdown119032
PO File11117
SVG20210

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.37MB with 0.19MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/close.png0.71KB0.40KB▼ 43.17%
screenshot-1.png196.00KB87.64KB▼ 55.29%
screenshot-2.png177.25KB77.99KB▼ 56.00%