Benchmarks
Plugin footprint 47% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲5.82MB] [CPU: ▲54.05ms] 75% from 4 tests
This is a short check of server-side resources used by Download Monitor
Please have a look at the following items
- Extra RAM: Extra memory usage must be kept under 5MB (currently 5.82MB on /wp-admin/admin.php?page=freemius)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.91 ▲5.44 | 83.12 ▲45.41 |
Dashboard /wp-admin | 9.31 ▲6.00 | 107.89 ▲57.90 |
Posts /wp-admin/edit.php | 9.32 ▲5.96 | 108.61 ▲61.18 |
Add New Post /wp-admin/post-new.php | 11.96 ▲6.06 | 149.15 ▲51.69 |
Media Library /wp-admin/upload.php | 9.12 ▲5.89 | 108.68 ▲74.25 |
Legacy Upgrader /wp-admin/admin.php?page=dlm_legacy_upgrade | 9.09 | 83.04 |
Freemius Debug [v.2.5.11] /wp-admin/admin.php?page=freemius | 9.36 | 81.17 |
Server storage [IO: ▲14.15MB] [DB: ▲0.03MB] Passed 3 tests
Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 774 new files
Database: 8 new tables, 39 new options
New tables |
---|
wp_dlm_order |
wp_dlm_downloads |
wp_dlm_order_transaction |
wp_download_log |
wp_dlm_order_item |
wp_dlm_session |
wp_dlm_order_customer |
wp_dlm_reports_log |
New WordPress options |
---|
dlm_turn_off_file_browser |
dlm_current_version |
download-monitor-rate-time |
dlm_user_agent_blacklist |
dlm_generate_hash_sha1 |
dlm_log_admin_download_count |
dlm_xsendfile_enabled |
dlm_generate_hash_md5 |
dlm_default_template |
dlm_custom_template |
... |
Browser metrics Passed 4 tests
A check of browser resources used by Download Monitor
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,985 ▲238 | 13.86 ▼0.72 | 9.18 ▲7.67 | 31.73 ▼4.24 |
Dashboard /wp-admin | 2,299 ▲122 | 5.75 ▲0.08 | 97.49 ▲2.64 | 44.47 ▼3.56 |
Posts /wp-admin/edit.php | 2,168 ▲68 | 2.10 ▲0.09 | 41.09 ▲1.27 | 39.57 ▲2.07 |
Add New Post /wp-admin/post-new.php | 1,735 ▲206 | 24.78 ▲1.56 | 703.68 ▲83.34 | 41.59 ▼8.50 |
Media Library /wp-admin/upload.php | 1,498 ▲101 | 4.31 ▲0.13 | 110.82 ▲8.28 | 45.89 ▲2.85 |
Legacy Upgrader /wp-admin/admin.php?page=dlm_legacy_upgrade | 842 | 1.67 | 29.24 | 28.54 |
Freemius Debug [v.2.5.11] /wp-admin/admin.php?page=freemius | 1,122 | 1.71 | 30.13 | 32.21 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.03MB] 25% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
- This plugin cannot be uninstalled
- > Notice in wp-content/plugins/download-monitor/includes/submodules/freemius/includes/class-freemius.php+8515
Undefined property: stdClass::$plugins
- The uninstall procedure failed, leaving 8 tables in the database
- wp_dlm_order_transaction
- wp_dlm_order_item
- wp_dlm_downloads
- wp_download_log
- wp_dlm_reports_log
- wp_dlm_order_customer
- wp_dlm_order
- wp_dlm_session
- This plugin does not fully uninstall, leaving 39 options in the database
- widget_recent-posts
- dlm_product_errors
- dlm_logging_ip_type
- dlm_hotlink_protection_enabled
- dlm_generate_hash_sha1
- dlm_turn_off_file_browser
- dlm_enable_window_logging
- dlm_log_admin_download_count
- can_compress_scripts
- dlm_download_endpoint
- ...
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 no errors were found, this is by no means an exhaustive test
SRP 0% 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
The following issues need your attention
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/download-monitor/src/Admin/Reports/templates/dlm-js-templates.php
- 83× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'WPChill\\DownloadMonitor\\Dependencies\\PayPalHttp\\Serializer' not found in wp-content/plugins/download-monitor/src/Dependencies/PayPalHttp/Serializer/Multipart.php:17
- > PHP Fatal error
Uncaught Error: Interface 'WPChill\\DownloadMonitor\\Dependencies\\Pimple\\ServiceProviderInterface' not found in wp-content/plugins/download-monitor/src/Dependencies/Pimple/Tests/Fixtures/PimpleServiceProvider.php:32
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/download-monitor/src/Dependencies/Pimple/Tests/PimpleTest.php:35
- > PHP Fatal error
Uncaught Error: Interface 'WPChill\\DownloadMonitor\\Dependencies\\Psr\\Container\otFoundExceptionInterface' not found in wp-content/plugins/download-monitor/src/Dependencies/Pimple/Exception/InvalidServiceIdentifierException.php:36
- > PHP Fatal error
Uncaught Error: Class 'WPChill\\DownloadMonitor\\Dependencies\\PayPalHttp\\HttpRequest' not found in wp-content/plugins/download-monitor/src/Shop/Checkout/PaymentGateway/PayPal/Payments/CapturesGetRequest.php:14
- > PHP Fatal error
Uncaught Error: Interface 'WPChill\\DownloadMonitor\\Dependencies\\Pimple\\ServiceProviderInterface' not found in wp-content/plugins/download-monitor/src/Shop/Services/ServiceProvider.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/download-monitor/src/Admin/Reports/components/php-components/top-downloads-footer.php:9
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/download-monitor/src/Admin/class-dlm-empty-table.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'WPChill\\DownloadMonitor\\Dependencies\\PayPalHttp\\HttpClient' not found in wp-content/plugins/download-monitor/src/Shop/Checkout/PaymentGateway/PayPal/Core/PayPalHttpClient.php:7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/download-monitor/src/Dependencies/Pimple/Tests/PimpleServiceProviderInterfaceTest.php:35
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
- Tags: You are using too many tags: 13 tag instead of maximum 10
download-monitor/download-monitor.php 92% from 13 tests
The primary PHP file in "Download Monitor" version 4.9.3 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
- Description: Keep the plugin description shorter than 140 characters (currently 164 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin181,158 lines of code in 636 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 436 | 14,618 | 29,149 | 57,240 |
PO File | 29 | 22,330 | 23,764 | 49,261 |
JavaScript | 65 | 2,478 | 1,449 | 36,967 |
CSS | 50 | 4,749 | 235 | 32,238 |
LESS | 19 | 814 | 130 | 4,727 |
EJS | 1 | 48 | 15 | 345 |
Markdown | 1 | 68 | 0 | 214 |
JSON | 32 | 0 | 0 | 138 |
XML | 1 | 3 | 0 | 16 |
SVG | 2 | 0 | 1 | 12 |
PHP code 50% from 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
The following items need your attention
- Cyclomatic complexity of classes should be reduced to less than 1000 (currently 3,087)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.48 |
Average class complexity | 23.70 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,087.00 |
Average method complexity | 3.41 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 38 | |
Interfaces | 14 | |
Traits | 0 | |
Classes | 294 | |
▷ Abstract classes | 8 | 2.72% |
▷ Concrete classes | 286 | 97.28% |
▷ Final classes | 2 | 0.70% |
Methods | 2,994 | |
▷ Static methods | 283 | 9.45% |
▷ Public methods | 2,450 | 81.83% |
▷ Protected methods | 26 | 0.87% |
▷ Private methods | 518 | 17.30% |
Functions | 202 | |
▷ Named functions | 112 | 55.45% |
▷ Anonymous functions | 90 | 44.55% |
Constants | 180 | |
▷ Global constants | 111 | 61.67% |
▷ Class constants | 69 | 38.33% |
▷ Public constants | 69 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
49 PNG files occupy 1.84MB with 0.44MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/features/track-your-content.png | 1.47KB | 0.87KB | ▼ 40.69% |
assets/images/features/easy-duplication.png | 6.38KB | 4.06KB | ▼ 36.34% |
assets/images/filetypes/document-illustrator.png | 0.62KB | 0.70KB | 0.00% |
assets/images/filetypes/document-text-image.png | 0.59KB | 0.60KB | 0.00% |
includes/submodules/freemius/assets/img/plugin-icon.png | 9.16KB | 5.26KB | ▼ 42.58% |