94% woocommerce-upload-my-file

Code Review | WooCommerce Upload My File

WordPress plugin WooCommerce Upload My File scored 94% from 54 tests.

About plugin

  • Plugin page: woocommerce-uploa...
  • Plugin version: 0.6.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3.0-5.7
  • WordPress version: 5.8.1
  • First release: Apr 4, 2013
  • Latest release: Mar 10, 2021
  • Number of updates: 59
  • Update frequency: every 49.1 days
  • Top authors: bpluijms (100%)

Code review

54 tests

User reviews

17 reviews

Install metrics

1,000+ active / 63,447 total downloads


Plugin footprint Passed 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: ▲0.08MB] [CPU: ▼142.67ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce Upload My File
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.0836.57 ▲1.48
Dashboard /wp-admin3.14 ▲0.0846.75 ▲0.57
Posts /wp-admin/edit.php3.25 ▲0.1443.51 ▼0.36
Add New Post /wp-admin/post-new.php5.50 ▲0.0688.50 ▼571.05
Media Library /wp-admin/upload.php3.08 ▲0.0832.53 ▲0.16

Server storage [IO: ▲0.16MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by WooCommerce Upload My File
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,683 ▲10115.94 ▲0.4511.79 ▲0.5047.79 ▼8.03
Dashboard /wp-admin2,974 ▲405.99 ▼0.06144.03 ▼1.43109.17 ▲1.34
Posts /wp-admin/edit.php2,743 ▲42.72 ▲0.0067.00 ▼1.5988.78 ▼1.73
Add New Post /wp-admin/post-new.php1,618 ▲3721.42 ▲0.81300.55 ▼92.59101.23 ▼17.15
Media Library /wp-admin/upload.php1,737 ▼735.00 ▼0.01151.40 ▼36.29115.22 ▼0.66

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/woocommerce-upload-my-file/inc/class-check-woocommerce.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: file upload, woocommerce

woocommerce-upload-my-file/woocommerce-upload-my-file.php 92% from 13 tests

The primary PHP file in "WooCommerce Upload My File" version 0.6.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.6" instead of "3.3.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,659 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PO File55921,025922

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity2.50
▷ Minimum method complexity2.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods2100.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions29100.00%
▷ Anonymous functions00.00%
▷ Global constants00.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
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/umf-icon-accept.png0.63KB0.58KB▼ 7.47%
img/umf-file-icons.png5.02KB2.26KB▼ 54.98%
img/icon-check.png0.31KB0.24KB▼ 24.69%
img/icon-umf.png0.24KB0.19KB▼ 20.49%
img/umf-icon-cross.png0.75KB0.65KB▼ 12.83%