94% woo-addon-uploads

Code Review | File Uploads Addon for WooCommerce

WordPress plugin File Uploads Addon for WooCommerce scored 94% from 53 tests.

About plugin

  • Plugin page: woo-addon-uploads
  • Plugin version: 1.4.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.8
  • WordPress version: 5.8.1
  • First release: Apr 29, 2017
  • Latest release: Aug 18, 2021
  • Number of updates: 36
  • Update frequency: every 43.7 days
  • Top authors: Dhruvin (52.78%)ImagiSol (50%)

Code review

53 tests

User reviews

10 reviews

Install metrics

2,000+ active / 14,774 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.07MB] [CPU: ▼270.24ms] Passed 4 tests

A check of server-side resources used by File Uploads Addon for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0736.83 ▲6.81
Dashboard /wp-admin3.13 ▲0.0835.82 ▼5.80
Posts /wp-admin/edit.php3.24 ▲0.1343.78 ▲3.30
Add New Post /wp-admin/post-new.php5.49 ▲0.0693.85 ▼1,076.26
Media Library /wp-admin/upload.php3.07 ▲0.0737.13 ▼2.19

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for File Uploads Addon for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,674 ▲6815.85 ▲0.237.58 ▼1.9247.87 ▲0.96
Dashboard /wp-admin2,930 ▲805.89 ▼0.14135.76 ▲10.83101.26 ▲4.80
Posts /wp-admin/edit.php2,707 ▲12.70 ▲0.0266.03 ▲0.0389.26 ▼1.57
Add New Post /wp-admin/post-new.php1,655 ▲218.79 ▼0.02348.66 ▼20.17103.40 ▼11.94
Media Library /wp-admin/upload.php1,701 ▼685.00 ▼0.02148.91 ▼2.26130.25 ▲20.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/woo-addon-uploads/woocommerce-addon-uploads.php:55

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
8 plugin tags: woocommerce, file upload, woocommerce product addons, print on demand, uploads...

woo-addon-uploads/woocommerce-addon-uploads.php 85% from 13 tests

The main file in "File Uploads Addon for WooCommerce" v. 1.4.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Requires at least: Required version does not match the one declared in readme.txt ("5.0" instead of "3.0.0")
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-addon-uploads.php" instead of "woocommerce-addon-uploads.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin268 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP4109174262
CSS1106

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity26.00
Average method complexity2.10
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods2379.31%
▷ Protected methods00.00%
▷ Private methods620.69%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 1 test

Image compression Passed 1 test

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin