58% downloadio

Code Review | Downloadio - Manage and Sell Digital Downloads

WordPress plugin Downloadio - Manage and Sell Digital Downloads scored 58% from 54 tests.

About plugin

  • Plugin page: downloadio
  • Plugin version: 1.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 5.8.1
  • First release: Sep 4, 2021
  • Latest release: Oct 18, 2021
  • Number of updates: 6
  • Update frequency: every 7.5 days
  • Top authors: downloadio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 205 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲4.68MB] [CPU: ▼137.60ms] 75% from 4 tests

A check of server-side resources used by Downloadio - Manage and Sell Digital Downloads
Please take the time to fix the following items
  • RAM: Total memory usage must be kept under 10MB (currently 10.38MB on /wp-admin/post-new.php?post_type=downloadio-download)
PageMemory (MB)CPU Time (ms)
Home /7.45 ▲4.6269.76 ▲37.46
Dashboard /wp-admin7.78 ▲4.7274.40 ▲33.76
Posts /wp-admin/edit.php7.84 ▲4.7374.52 ▲32.58
Add New Post /wp-admin/post-new.php10.33 ▲4.90119.34 ▼647.71
Media Library /wp-admin/upload.php7.64 ▲4.6463.80 ▲30.97
All Downloads /wp-admin/edit.php?post_type=downloadio-download7.8684.76
Tags /wp-admin/edit-tags.php?taxonomy=downloadio-download-tag&post_type=downloadio-download7.6560.11
Categories /wp-admin/edit-tags.php?taxonomy=downloadio-download-category&post_type=downloadio-download7.6661.37
Logs /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-logs7.8465.28
Add New /wp-admin/post-new.php?post_type=downloadio-download10.38124.36
Reports /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-reports7.9366.64
Users /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-users7.8262.98
Settings /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-settings7.8167.26
Access Codes /wp-admin/edit.php?post_type=downloadio-ac7.8660.13
Extensions /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-extensions7.7167.07

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 431 new files
Database: 5 new tables, 8 new options
New tables
wp_downloadio_download_files
wp_downloadio_download_access_codes
wp_downloadio_download_bundles
wp_downloadio_download_acquires
wp_downloadio_notice_sessions
New WordPress options
downloadio_version
_downloadio_settings
downloadio_downloads_page
downloadio_no_access_page
downloadio_permalinks
downloadio_my_downloads_page
downloadio_installed
downloadio_redirect_flag

Browser metrics Passed 4 tests

This is an overview of browser requirements for Downloadio - Manage and Sell Digital Downloads
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,790 ▲19415.89 ▲0.348.79 ▼0.8350.12 ▲4.21
Dashboard /wp-admin3,049 ▲1136.09 ▲0.14129.11 ▼15.19107.56 ▼5.29
Posts /wp-admin/edit.php2,818 ▲792.70 ▲0.0262.60 ▼1.3089.68 ▲6.50
Add New Post /wp-admin/post-new.php1,733 ▲23318.79 ▲0.02369.59 ▼4.82112.19 ▲2.53
Media Library /wp-admin/upload.php1,889 ▲825.03 ▼0.00149.00 ▼2.33119.09 ▼2.50
All Downloads /wp-admin/edit.php?post_type=downloadio-download2,0726.45104.8877.99
Tags /wp-admin/edit-tags.php?taxonomy=downloadio-download-tag&post_type=downloadio-download1,7872.5362.2878.75
Categories /wp-admin/edit-tags.php?taxonomy=downloadio-download-category&post_type=downloadio-download1,8152.5063.2680.93
Logs /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-logs1,8806.1795.2363.56
Add New /wp-admin/post-new.php?post_type=downloadio-download7,95226.97575.38204.63
Reports /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-reports2,4256.09160.6199.30
Users /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-users1,7786.0690.3956.64
Settings /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-settings4,1155.41115.4793.67
Access Codes /wp-admin/edit.php?post_type=downloadio-ac2,0956.0798.9075.78
Extensions /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-extensions1,7485.6297.8798.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables detected upon uninstall: 5 tables
    • wp_downloadio_download_files
    • wp_downloadio_download_bundles
    • wp_downloadio_download_acquires
    • wp_downloadio_download_access_codes
    • wp_downloadio_notice_sessions
  • Zombie WordPress options detected upon uninstall: 8 options
    • downloadio_downloads_page
    • downloadio_redirect_flag
    • downloadio_my_downloads_page
    • downloadio_version
    • downloadio_permalinks
    • _downloadio_settings
    • downloadio_installed
    • downloadio_no_access_page

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'UAParser\\Util\\Logfile\\ReaderInterface' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/Util/Logfile/AbstractReader.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Exception\\DomainException' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/Exception/FetcherException.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\AbstractParser' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/OperatingSystemParser.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Result\\AbstractClient' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/Result/Client.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\AbstractParser' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/Parser.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'UAParser\\Util\\Logfile\\AbstractReader' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/Util/Logfile/ApacheCommonLogFormatReader.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/Command/ParserCommand.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/Command/UpdateCommand.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/downloadio/includes/Admin/Users/Details/Table.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/Command/ConvertCommand.php:18

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-reports
    • > Intervention (severe) in unknown
    /wp-admin/post-new.php?post_type=downloadio-download - Blocked attempt to show a 'beforeunload' confirmation panel for a frame that never had a user gesture since its load. https://www.chromestatus.com/feature/5082396709879808

Optimizations

Plugin configuration Passed 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
5 plugin tags: digital store, download manager, digital product, download, downloadio

downloadio/downloadio.php Passed 13 tests

This is the main PHP file of "Downloadio - Manage and Sell Digital Downloads" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
34 characters long description:
Manage and Sell Digital Downloads.

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/downloadio/vendor/bin/uaparser.bat
63,901 lines of code in 381 files:
LanguageFilesBlank linesComment linesLines of code
PHP2747,8157,62336,483
CSS2649293110,355
PO File203,0373,4146,180
JavaScript191,5607195,348
Sass1595934,837
Markdown3990317
JSON400279
SVG160144
Bourne Shell214139
XML10015
DOS Batch1004

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 167)
Cyclomatic complexity
Average complexity per logical line of code0.66
Average class complexity30.35
▷ Minimum class complexity1.00
▷ Maximum class complexity306.00
Average method complexity6.62
▷ Minimum method complexity1.00
▷ Maximum method complexity167.00
Code structure
Namespaces22
Interfaces1
Traits1
Classes151
▷ Abstract classes74.64%
▷ Concrete classes14495.36%
▷ Final classes53.47%
Methods781
▷ Static methods9912.68%
▷ Public methods50865.04%
▷ Protected methods24130.86%
▷ Private methods324.10%
Functions182
▷ Named functions14881.32%
▷ Anonymous functions3418.68%
Constants12
▷ Global constants1191.67%
▷ Class constants18.33%
▷ Public constants1100.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
14 PNG files occupy 0.40MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/jquery-ui/ui-icons_ffffff_256x240.png6.17KB4.18KB▼ 32.17%
assets/images/extensions/mailchimp.png28.92KB12.07KB▼ 58.26%
assets/images/extensions/amazon-s3.png65.66KB31.37KB▼ 52.22%
assets/images/extensions/ninja-forms.png41.04KB18.07KB▼ 55.98%
assets/images/placeholder-40x40.png1.95KB0.72KB▼ 63.01%