90% checkout-files-upload-woocommerce

Code Review | Checkout Files Upload for WooCommerce

WordPress plugin Checkout Files Upload for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: checkout-files-up...
  • Plugin version: 2.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Sep 6, 2016
  • Latest release: Jul 14, 2023
  • Number of updates: 71
  • Update frequency: every 35.3 days
  • Top authors: wpwham (56.34%)algoritmika (45.07%)

Code review

54 tests

User reviews

11 reviews

Install metrics

8,000+ active /111,806 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by Checkout Files Upload for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.77 ▲0.0441.84 ▼1.98
Dashboard /wp-admin3.60 ▼0.0351.19 ▼13.88
Posts /wp-admin/edit.php3.72 ▲0.0457.46 ▼2.30
Add New Post /wp-admin/post-new.php6.18 ▲0.0488.21 ▼19.43
Media Library /wp-admin/upload.php3.52 ▲0.0440.20 ▲4.59

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Checkout Files Upload for WooCommerce
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.31 ▼0.061.74 ▼0.0743.16 ▲1.00
Dashboard /wp-admin2,192 ▲125.57 ▲0.0295.11 ▲8.0242.68 ▲1.87
Posts /wp-admin/edit.php2,103 ▲62.03 ▲0.0436.92 ▼1.2035.99 ▼0.28
Add New Post /wp-admin/post-new.php1,533 ▲723.14 ▲5.69708.35 ▼1.8354.24 ▲3.47
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.0398.11 ▼21.9645.68 ▼3.06

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: checkout, woocommerce, checkout files upload, woo commerce

checkout-files-upload-woocommerce/checkout-files-upload-woocommerce.php Passed 13 tests

The principal PHP file in "Checkout Files Upload for WooCommerce" v. 2.1.5 is loaded by WordPress automatically on each request
67 characters long description:
Let your customers upload files on (or after) WooCommerce checkout.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected2,384 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP102195722,115
JavaScript22726241
CSS21828

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity41.88
▷ Minimum class complexity1.00
▷ Maximum class complexity287.00
Average method complexity7.06
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes112.50%
Methods54
▷ Static methods59.26%
▷ Public methods54100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/default_file_image.png2.38KB0.92KB▼ 61.29%