64% downloadio

Code Review | Downloadio - Manage and Sell Digital Downloads

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

About plugin

  • Plugin page: downloadio
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1
  • WordPress version: 6.3.1
  • First release: Sep 4, 2021
  • Latest release: Jan 12, 2023
  • Number of updates: 7
  • Update frequency: every 70.9 days
  • Top authors: downloadio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /732 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.67MB] [CPU: ▲24.04ms] 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.81MB on /wp-admin/post-new.php?post_type=downloadio-download)
PageMemory (MB)CPU Time (ms)
Home /8.09 ▲4.6376.02 ▲37.18
Dashboard /wp-admin8.03 ▲4.6874.42 ▲14.54
Posts /wp-admin/edit.php8.08 ▲4.7285.73 ▲39.27
Add New Post /wp-admin/post-new.php10.77 ▲4.88109.21 ▲8.27
Media Library /wp-admin/upload.php7.89 ▲4.6668.77 ▲36.15
Add New /wp-admin/post-new.php?post_type=downloadio-download10.81112.54
Logs /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-logs8.0872.21
Categories /wp-admin/edit-tags.php?taxonomy=downloadio-download-category&post_type=downloadio-download7.8962.93
All Downloads /wp-admin/edit.php?post_type=downloadio-download8.1080.09
Reports /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-reports8.1766.22
Access Codes /wp-admin/edit.php?post_type=downloadio-ac8.1271.98
Extensions /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-extensions7.9466.98
Tags /wp-admin/edit-tags.php?taxonomy=downloadio-download-tag&post_type=downloadio-download7.8962.53
Users /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-users8.0565.37
Settings /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-settings8.0570.06

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, 14 new options
New tables
wp_downloadio_notice_sessions
wp_downloadio_download_acquires
wp_downloadio_download_files
wp_downloadio_download_bundles
wp_downloadio_download_access_codes
New WordPress options
widget_recent-comments
_downloadio_settings
theysaidso_admin_options
can_compress_scripts
downloadio_version
downloadio_my_downloads_page
downloadio_downloads_page
downloadio_permalinks
downloadio_redirect_flag
downloadio_no_access_page
...

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 /2,857 ▲9614.23 ▼0.171.82 ▲0.0341.94 ▲2.01
Dashboard /wp-admin2,260 ▲795.65 ▲0.0796.15 ▼4.8542.24 ▲0.60
Posts /wp-admin/edit.php2,162 ▲622.03 ▲0.0839.20 ▲2.9834.93 ▼0.25
Add New Post /wp-admin/post-new.php1,578 ▲5122.86 ▼0.31594.72 ▼67.7151.44 ▼7.74
Media Library /wp-admin/upload.php1,462 ▲654.21 ▲0.0096.02 ▼2.7643.02 ▼6.45
Add New /wp-admin/post-new.php?post_type=downloadio-download7,94724.131,009.0387.29
Logs /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-logs1,3925.1061.9320.76
Categories /wp-admin/edit-tags.php?taxonomy=downloadio-download-category&post_type=downloadio-download1,3392.1226.3731.26
All Downloads /wp-admin/edit.php?post_type=downloadio-download1,5415.2561.5928.20
Reports /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-reports2,2996.68116.9432.46
Access Codes /wp-admin/edit.php?post_type=downloadio-ac1,5505.3563.2627.99
Extensions /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-extensions1,3065.0157.1672.42
Tags /wp-admin/edit-tags.php?taxonomy=downloadio-download-tag&post_type=downloadio-download1,3052.2426.7329.18
Users /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-users1,3285.3358.4322.98
Settings /wp-admin/edit.php?post_type=downloadio-download&page=downloadio-settings3,3075.4469.2846.14

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_acquires
    • wp_downloadio_download_bundles
    • wp_downloadio_download_files
    • wp_downloadio_download_access_codes
    • wp_downloadio_notice_sessions
  • Zombie WordPress options detected upon uninstall: 14 options
    • downloadio_version
    • theysaidso_admin_options
    • downloadio_downloads_page
    • downloadio_installed
    • widget_theysaidso_widget
    • downloadio_no_access_page
    • widget_recent-comments
    • widget_recent-posts
    • downloadio_permalinks
    • can_compress_scripts
    • ...

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
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: Class 'UAParser\\AbstractParser' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/DeviceParser.php:15
    • > 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 '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\\Exception\\DomainException' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/Exception/ReaderException.php:11
    • > 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\\Result\\AbstractVersionedSoftware' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/Result/OperatingSystem.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 'Symfony\\Component\\Console\\Command\\Command' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/Command/LogfileCommand.php:26
    • > 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\\Util\\Logfile\\AbstractReader' not found in wp-content/plugins/downloadio/vendor/ua-parser/uap-php/src/Util/Logfile/ApacheCommonLogFormatReader.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

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: downloadio, download manager, digital store, digital product, download

downloadio/downloadio.php Passed 13 tests

This is the main PHP file of "Downloadio - Manage and Sell Digital Downloads" version 1.1.3, 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.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/jquery-ui/ui-icons_cc0000_256x240.png4.52KB4.18KB▼ 7.56%
assets/images/jquery-ui/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
assets/images/placeholder-1200x900.png79.77KB50.11KB▼ 37.18%
assets/images/extensions/ninja-forms.png41.04KB18.07KB▼ 55.98%
libs/codestar-framework/assets/images/checkerboard.png2.29KB2.54KB0.00%