77% ultimate-downloadable-products-for-woocommerce

Code Review | Ultimate Downloadable Products for WooCommerce

WordPress plugin Ultimate Downloadable Products for WooCommerce scored77%from 54 tests.

About plugin

  • Plugin page: ultimate-download...
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5.0-6.3.1
  • WordPress version: 6.3.1
  • First release: Jul 14, 2022
  • Latest release: Sep 7, 2023
  • Number of updates: 14
  • Update frequency: every 30.1 days
  • Top authors: ethereumicoio (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

50+ active /1,483 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.93ms] Passed 4 tests

This is a short check of server-side resources used by Ultimate Downloadable Products for WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.44 ▼2.16
Dashboard /wp-admin3.31 ▲0.0045.05 ▼3.49
Posts /wp-admin/edit.php3.36 ▲0.0044.84 ▼3.90
Add New Post /wp-admin/post-new.php5.89 ▲0.0090.89 ▼14.16
Media Library /wp-admin/upload.php3.23 ▲0.0035.43 ▲1.77

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

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

Browser metrics Passed 4 tests

Ultimate Downloadable Products for WooCommerce: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.191.79 ▲0.0842.99 ▼7.59
Dashboard /wp-admin2,209 ▲214.83 ▼1.07107.75 ▼0.7541.36 ▼8.07
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0440.67 ▲3.2835.97 ▲2.59
Add New Post /wp-admin/post-new.php1,537 ▼523.51 ▲5.22630.96 ▲30.2954.57 ▼8.44
Media Library /wp-admin/upload.php1,388 ▼34.24 ▲0.04101.22 ▼3.9143.24 ▼4.14

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
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/symfony/process/Tests/KillableProcessWithOutput.php
    • > /wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/symfony/process/Tests/ThreeSecondProcess.php
  • 107× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/symfony/process/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/symfony/process/Tests/ErrorProcessInitiator.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Process\\Exception\\RuntimeException' not found in wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/symfony/process/Exception/ProcessFailedException.php:21
    • > PHP Warning
      Use of undefined constant ISO_LIB_PATH - assumed 'ISO_LIB_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/phpclasses/php-iso-file/classes/iso_includes.php on line 7
    • > PHP Warning
      include_once(): Failed opening 'ISO_LIB_PATHdescriptor.class.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/phpclasses/php-iso-file/classes/iso_includes.php on line 6
    • > PHP Warning
      include_once(ISO_LIB_PATHdescriptor_boot.class.php): failed to open stream: No such file or directory in wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/phpclasses/php-iso-file/classes/iso_includes.php on line 7
    • > PHP Warning
      Use of undefined constant ISO_LIB_PATH - assumed 'ISO_LIB_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/phpclasses/php-iso-file/classes/iso_includes.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'wapmorgan\\UnifiedArchive\\Drivers\\BasicDriver' not found in wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/wapmorgan/unified-archive/src/Drivers/SevenZip.php:15
    • > PHP Fatal error
      require_once(): Failed opening required 'PEAR.php' (include_path='.:/usr/share/php') in wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/pear/archive_tar/Archive/Tar.php on line 45
    • > PHP Fatal error
      Uncaught Error: Class 'wapmorgan\\UnifiedArchive\\Commands\\BaseArchiveCommand' not found in wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/wapmorgan/unified-archive/src/Commands/FoldersCommand.php:9
    • > PHP Warning
      Use of undefined constant ISO_LIB_PATH - assumed 'ISO_LIB_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/ultimate-downloadable-products-for-woocommerce/vendor/phpclasses/php-iso-file/classes/iso_includes.php on line 4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
3 plugin tags: downloads, e-commerce, woocommerce

ultimate-downloadable-products-for-woocommerce/ultimate-downloadable-products-for-woocommerce.php 92% from 13 tests

The main file in "Ultimate Downloadable Products for WooCommerce" v. 1.3.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "5.5.0")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected59,515 lines of code in 368 files:
LanguageFilesBlank linesComment linesLines of code
PHP25711,12424,56449,697
PO File821,9812,5727,583
XML32301,124
JSON100765
JavaScript53560208
CSS146055
SVG10143
reStructuredText216234
Bourne Shell1204
YAML2002

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 3,073)
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 101)
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity41.96
▷ Minimum class complexity1.00
▷ Maximum class complexity3,073.00
Average method complexity4.02
▷ Minimum method complexity1.00
▷ Maximum method complexity101.00
Code structure
Namespaces17
Interfaces6
Traits1
Classes161
▷ Abstract classes53.11%
▷ Concrete classes15696.89%
▷ Final classes31.92%
Methods2,330
▷ Static methods42018.03%
▷ Public methods1,80777.55%
▷ Protected methods1164.98%
▷ Private methods40717.47%
Functions175
▷ Named functions13778.29%
▷ Anonymous functions3821.71%
Constants366
▷ Global constants19854.10%
▷ Class constants16845.90%
▷ Public constants168100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.87MB with 0.52MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/freemius/wordpress-sdk/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
assets/screenshot-3.png317.25KB95.77KB▼ 69.81%
assets/screenshot-4.png308.84KB93.17KB▼ 69.83%
assets/screenshot-6.png40.26KB12.96KB▼ 67.80%
vendor/freemius/wordpress-sdk/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%