84% woo-addon-uploads

Code Review | File Uploads Addon for WooCommerce

WordPress plugin File Uploads Addon for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: woo-addon-uploads
  • Plugin version: 1.7.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Apr 29, 2017
  • Latest release: Oct 26, 2023
  • Number of updates: 45
  • Update frequency: every 52.7 days
  • Top authors: Dhruvin (62.22%)ImagiSol (40%)

Code review

54 tests

User reviews

19 reviews

Install metrics

4,000+ active /38,539 total downloads

Benchmarks

Plugin footprint 83% from 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.00MB] [CPU: ▼11.43ms] Passed 4 tests

This is a short check of server-side resources used by File Uploads Addon for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0141.26 ▲1.83
Dashboard /wp-admin3.32 ▼0.0339.10 ▼19.84
Posts /wp-admin/edit.php3.37 ▲0.0146.20 ▼4.67
Add New Post /wp-admin/post-new.php5.90 ▲0.0175.27 ▼20.32
Media Library /wp-admin/upload.php3.25 ▲0.0132.64 ▼0.87

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for File Uploads Addon for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.34 ▼0.411.80 ▲0.1644.47 ▲0.41
Dashboard /wp-admin2,195 ▲155.63 ▲0.0293.28 ▲6.2642.28 ▲0.54
Posts /wp-admin/edit.php2,100 ▼02.00 ▼0.0140.91 ▲0.2640.61 ▲2.12
Add New Post /wp-admin/post-new.php1,526 ▼223.15 ▲0.20661.63 ▲5.1149.77 ▼3.49
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0892.54 ▼18.3340.26 ▼7.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • 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
Good news, no errors were detected

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-addon-uploads/includes/class-wau-pro-features.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-addon-uploads/woocommerce-addon-uploads.php:71

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% 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
8 plugin tags: woocommerce file upload, woocommerce, addon, woocommerce product addons, uploads...

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

The principal PHP file in "File Uploads Addon for WooCommerce" v. 1.7.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-addon-uploads.php" instead of "woocommerce-addon-uploads.php")
  • Requires at least: Required version must match the one declared in readme.txt ("5.0" instead of "3.0.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
No dangerous file extensions were detected632 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP5139254464
CSS287168

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity13.60
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.67
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods37
▷ Static methods12.70%
▷ Public methods3183.78%
▷ Protected methods00.00%
▷ Private methods616.22%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin