63% woo-file-dropzone

Code Review | Woo File Dropzone

WordPress plugin Woo File Dropzone scored63%from 54 tests.

About plugin

  • Plugin page: woo-file-dropzone
  • Plugin version: 1.1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9
  • WordPress version: 6.3.1
  • First release: Jun 29, 2016
  • Latest release: Nov 23, 2017
  • Number of updates: 46
  • Update frequency: every 11.1 days
  • Top authors: gmbhurgri (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

100+ active /11,416 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.76ms] Passed 4 tests

Server-side resources used by Woo File Dropzone
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.49 ▼0.98
Dashboard /wp-admin3.32 ▲0.0248.76 ▼7.34
Posts /wp-admin/edit.php3.37 ▲0.0150.15 ▲0.26
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.92 ▼14.99
Media Library /wp-admin/upload.php3.25 ▲0.0238.36 ▲3.98
Woo File Dropzone /wp-admin/options-general.php?page=woo-file-dropzone-options3.3132.04

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 80 new files
Database: 1 new table, 6 new options
New tables
wp_woo_file_dropzone
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Woo File Dropzone
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲5914.66 ▲0.501.81 ▲0.2143.87 ▲3.32
Dashboard /wp-admin2,201 ▲215.68 ▲0.0689.86 ▼0.7037.62 ▼8.21
Posts /wp-admin/edit.php2,109 ▲92.06 ▲0.0338.97 ▲2.3734.73 ▼0.14
Add New Post /wp-admin/post-new.php1,533 ▲523.07 ▲0.03696.40 ▲48.7067.50 ▲17.04
Media Library /wp-admin/upload.php1,397 ▼34.33 ▲0.14102.21 ▼6.4843.11 ▼3.64
Woo File Dropzone /wp-admin/options-general.php?page=woo-file-dropzone-options1,2462.7843.1630.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_woo_file_dropzone
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=woo-file-dropzone-options
    • > Notice in wp-content/plugins/woo-file-dropzone/views/options.php+33
    Undefined variable: isFileUploadMandatory

SRP 50% 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
Please fix the following items
  • 12× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/woo-file-dropzone/views/product-detail-page.php
    • > /wp-content/plugins/woo-file-dropzone/woo-file-dropzone.php
    • > /wp-content/plugins/woo-file-dropzone/helpers/Helper_LoggerWooFileDropzone.php
    • > /wp-content/plugins/woo-file-dropzone/models/Model_WooFileDropzone.php
    • > /wp-content/plugins/woo-file-dropzone/views/cart-page.php
    • > /wp-content/plugins/woo-file-dropzone/views/checkout-page.php
    • > /wp-content/plugins/woo-file-dropzone/controllers/Controller_UserWooFileDropzone.php
    • > /wp-content/plugins/woo-file-dropzone/controllers/Controller_AdminWooFileDropzone.php
    • > /wp-content/plugins/woo-file-dropzone/views/admin-order-detail.php
    • > /wp-content/plugins/woo-file-dropzone/helpers/Helper_WooFileDropzone.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=woo-file-dropzone-options
    • > Javascript (severe) in unknown
    /wp-content/plugins/woo-file-dropzone/assets/js/form-validator/security.js 8:7872 Uncaught TypeError: Cannot read properties of undefined (reading 'validationConfig')

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: woocommerce upload file, upload files, woocommerce file uploader, gmbhurgri, file upload...

woo-file-dropzone/woo-file-dropzone.php Passed 13 tests

Analyzing the main PHP file in "Woo File Dropzone" version 1.1.7
46 characters long description:
It enhance woocommerce store to receive files.

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
No dangerous file extensions were detected18,525 lines of code in 69 files:
LanguageFilesBlank linesComment linesLines of code
CSS71,500467,643
JavaScript336522,6835,121
PHP145034852,885
CoffeeScript38253492,236
Sass210036355
Markdown3810141
JSON400101
HTML13019
Bourne Shell11014
YAML10010

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity28.67
▷ Minimum class complexity3.00
▷ Maximum class complexity91.00
Average method complexity3.27
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods73
▷ Static methods56.85%
▷ Public methods5879.45%
▷ Protected methods1520.55%
▷ Private methods00.00%
Functions5
▷ Named functions360.00%
▷ Anonymous functions240.00%
Constants8
▷ Global constants787.50%
▷ Class constants112.50%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/delete-icon.png0.55KB0.68KB0.00%
assets/download-icon.png0.57KB0.41KB▼ 29.42%