83% woocommerce-quick-buy

Code Review | Quick Buy For Woocommerce

WordPress plugin Quick Buy For Woocommerce scored83%from 54 tests.

About plugin

  • Plugin page: woocommerce-quick...
  • Plugin version: 2.8.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.9
  • WordPress version: 6.3.1
  • First release: Dec 4, 2014
  • Latest release: Feb 12, 2022
  • Number of updates: 99
  • Update frequency: every 26.5 days
  • Top authors: varunms (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

3,000+ active /177,718 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: ▲1.39MB] [CPU: ▲3.65ms] Passed 4 tests

A check of server-side resources used by Quick Buy For Woocommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.81 ▲1.3550.75 ▲10.44
Dashboard /wp-admin4.76 ▲1.4160.07 ▼0.84
Posts /wp-admin/edit.php4.81 ▲1.4553.38 ▲13.90
Add New Post /wp-admin/post-new.php7.31 ▲1.4390.60 ▼8.92
Media Library /wp-admin/upload.php4.62 ▲1.3951.67 ▲21.81

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

Browser metrics Passed 4 tests

Quick Buy For Woocommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.542.11 ▲0.3741.65 ▼2.30
Dashboard /wp-admin2,206 ▲185.82 ▲0.90100.40 ▼14.9140.21 ▼5.17
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0436.62 ▼4.2229.87 ▼9.00
Add New Post /wp-admin/post-new.php1,519 ▼023.16 ▲0.12679.97 ▲50.1852.13 ▲2.53
Media Library /wp-admin/upload.php1,385 ▼34.19 ▼0.0398.15 ▲0.9245.70 ▲2.59

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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 | 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 items
  • 42× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPOnion\\DB\\Storage\\Base' not found in wp-content/plugins/woocommerce-quick-buy/vendor/wponion/wponion/core/db/storage/class-user.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wponion() in wp-content/plugins/woocommerce-quick-buy/vendor/wponion/wponion/includes/templates/wc/taxonomy.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wponion() in wp-content/plugins/woocommerce-quick-buy/vendor/wponion/wponion/includes/templates/wp/widgets.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wponion() in wp-content/plugins/woocommerce-quick-buy/vendor/wponion/wponion/includes/templates/wp-modern/nav_menu.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wponion() in wp-content/plugins/woocommerce-quick-buy/vendor/wponion/wponion/includes/templates/wp-lite/taxonomy.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wponion() in wp-content/plugins/woocommerce-quick-buy/vendor/wponion/wponion/includes/templates/wp-modern/widgets.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WPOnion\\Bridge\\Module_Utility' not found in wp-content/plugins/woocommerce-quick-buy/vendor/wponion/wponion/core/modules/admin/class-pointers.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WPOnion\\Field' not found in wp-content/plugins/woocommerce-quick-buy/vendor/wponion/wponion/includes/fields/visual-button-editor/class-visual-button-editor.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wponion() in wp-content/plugins/woocommerce-quick-buy/vendor/wponion/wponion/includes/templates/wc/widgets.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wponion() in wp-content/plugins/woocommerce-quick-buy/vendor/wponion/wponion/includes/templates/wp/nav_menu.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 28 tag instead of maximum 10
Please take inspiration from this readme.txt

woocommerce-quick-buy/wc-quick-buy.php 85% from 13 tests

This is the main PHP file of "Quick Buy For Woocommerce" version 2.8.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woocommerce-quick-buy.php" instead of "wc-quick-buy.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 file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin36,411 lines of code in 481 files:
LanguageFilesBlank linesComment linesLines of code
PHP4616,17321,14836,214
SVG200108
JavaScript59072
JSON8008
XML1005
CSS4004

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity12.13
▷ Minimum class complexity1.00
▷ Maximum class complexity230.00
Average method complexity2.77
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces70
Interfaces4
Traits43
Classes334
▷ Abstract classes5115.27%
▷ Concrete classes28384.73%
▷ Final classes144.95%
Methods2,437
▷ Static methods24610.09%
▷ Public methods1,68168.98%
▷ Protected methods69928.68%
▷ Private methods572.34%
Functions302
▷ Named functions29296.69%
▷ Anonymous functions103.31%
Constants27
▷ Global constants1762.96%
▷ Class constants1037.04%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
52 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/wponion/wponion/assets/img/layouts/100/body/full-width.png0.46KB0.27KB▼ 40.21%
vendor/wponion/wponion/assets/img/layouts/125/body/boxed.png0.41KB0.21KB▼ 49.53%
vendor/wponion/wponion/assets/img/layouts/100/sidebar/dual-sidebar.png0.37KB0.16KB▼ 55.56%
vendor/wponion/wponion/assets/img/layouts/100/sidebar/dual-sidebar-right.png0.37KB0.17KB▼ 53.72%
vendor/varunsridharan/vsp-framework/assets/img/noimage.png2.54KB1.54KB▼ 39.40%