Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
- The plugin cannot be installed
- > Deprecated in wp-content/plugins/download-directory/includes/class-dwn-repo-pro-activator.php+28
Non-static method Dwn_Repo_Pro_Admin::down_repo_taxonomy() should not be called statically
Server metrics [RAM: ▲0.20MB] [CPU: ▼134.67ms] Passed 4 tests
Server-side resources used by Download Directory
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.05 ▲0.33 | 49.22 ▲24.70 |
Dashboard /wp-admin | 3.31 ▲0.25 | 62.67 ▲4.56 |
Posts /wp-admin/edit.php | 3.36 ▲0.25 | 56.61 ▲10.34 |
Add New Post /wp-admin/post-new.php | 5.58 ▲0.15 | 104.03 ▼564.33 |
Media Library /wp-admin/upload.php | 3.17 ▲0.17 | 45.63 ▲10.75 |
Downloads License /wp-admin/edit-tags.php?taxonomy=down_license&post_type=down_repo | 3.26 | 45.18 |
Downloads Category /wp-admin/edit-tags.php?taxonomy=down_cat&post_type=down_repo | 3.26 | 54.79 |
Downloads Tag /wp-admin/edit-tags.php?taxonomy=down_tag&post_type=down_repo | 3.26 | 44.88 |
All Downloads /wp-admin/edit.php?post_type=down_repo | 3.30 | 54.36 |
Add New /wp-admin/post-new.php?post_type=down_repo | 3.14 | 48.84 |
Server storage [IO: ▲2.25MB] [DB: ▲0.01MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 144 new files
Database: 1 new table, 2 new options
New tables |
---|
wp_dwrp_alert |
New WordPress options |
---|
widget_down_repo_cat |
dwrp_db_version |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Download Directory
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 4,093 ▲497 | 18.11 ▲2.54 | 17.93 ▲9.72 | 51.98 ▼4.72 |
Dashboard /wp-admin | 3,217 ▲283 | 7.93 ▲1.98 | 166.77 ▲15.67 | 125.19 ▲2.01 |
Posts /wp-admin/edit.php | 3,015 ▲276 | 4.28 ▲1.59 | 126.45 ▲58.67 | 88.81 ▼15.08 |
Add New Post /wp-admin/post-new.php | 1,651 ▲60 | 21.32 ▲2.46 | 268.98 ▼123.20 | 122.60 ▼1.66 |
Media Library /wp-admin/upload.php | 1,861 ▲54 | 4.80 ▼0.24 | 120.98 ▼38.33 | 126.46 ▼6.06 |
Downloads License /wp-admin/edit-tags.php?taxonomy=down_license&post_type=down_repo | 1,988 | 3.89 | 84.09 | 87.86 |
Downloads Category /wp-admin/edit-tags.php?taxonomy=down_cat&post_type=down_repo | 2,019 | 3.86 | 87.36 | 78.95 |
Downloads Tag /wp-admin/edit-tags.php?taxonomy=down_tag&post_type=down_repo | 1,991 | 3.79 | 78.47 | 86.54 |
All Downloads /wp-admin/edit.php?post_type=down_repo | 1,756 | 4.22 | 89.20 | 75.49 |
Add New /wp-admin/post-new.php?post_type=down_repo | 3,894 | 8.60 | 258.76 | 168.28 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- This plugin does not fully uninstall, leaving 1 table in the database
- wp_dwrp_alert
- This plugin did not uninstall successfully, leaving 2 options in the database
- dwrp_db_version
- widget_down_repo_cat
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
- 5 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=down_repo
- > Notice in wp-content/plugins/download-directory/public/class-dwn-repo-template-functions.php+167
Undefined offset: 0
- 5 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=down_repo
- > Notice in wp-content/plugins/download-directory/public/class-dwn-repo-template-functions.php+167
Trying to get property 'term_id' of non-object
- 5 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=down_repo
- > Notice in wp-content/plugins/download-directory/public/class-dwn-repo-template-functions.php+170
Undefined property: WP_Error::$parent
- 5 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=down_repo
- > Notice in wp-content/plugins/download-directory/public/class-dwn-repo-template-functions.php+173
Undefined property: WP_Error::$term_id
- 5 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=down_repo
- > Notice in wp-content/plugins/download-directory/public/class-dwn-repo-template-functions.php+184
Undefined variable: taxonomy_name
SRP 0% 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
Almost there! Just fix the following items
- 2× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/download-directory/trunk/admin/partials/dwn-repo-pro-admin-display.php
- > /wp-content/plugins/download-directory/admin/partials/dwn-repo-pro-admin-display.php
- 16× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function _x() in wp-content/plugins/download-directory/admin/custom-category.php:23
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/download-directory/public/templates/down_repo-downloading.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function register_widget() in wp-content/plugins/download-directory/admin/widget-category.php:22
- > PHP Fatal error
Uncaught Error: Call to undefined function _x() in wp-content/plugins/download-directory/admin/post-type.php:23
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/download-directory/admin/metabox.php:83
- > PHP Fatal error
Uncaught Error: Call to undefined function _x() in wp-content/plugins/download-directory/admin/custom-tag.php:23
- > PHP Fatal error
Uncaught Error: Call to undefined function did_action() in wp-content/plugins/download-directory/includes/class-tgm-plugin-activation.php:2109
- > PHP Fatal error
Uncaught Error: Call to undefined function register_widget() in wp-content/plugins/download-directory/trunk/admin/widget-category.php:22
- > PHP Fatal error
Uncaught Error: Call to undefined function _x() in wp-content/plugins/download-directory/trunk/admin/custom-tag.php:23
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/download-directory/trunk/admin/metabox.php:83
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
- Requires at least: Version not formatted correctly
download-directory/dwn-repo-pro.php 92% from 13 tests
The main PHP file in "Download Directory" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("download-directory.php" instead of "dwn-repo-pro.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin8,775 lines of code in 43 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PO File | 18 | 1,527 | 2,093 | 5,035 |
PHP | 21 | 704 | 2,605 | 2,852 |
CSS | 2 | 10 | 10 | 791 |
JavaScript | 2 | 32 | 14 | 97 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 25.06 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 206.00 |
Average method complexity | 3.47 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 34.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 36 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 36 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 350 | |
▷ Static methods | 18 | 5.14% |
▷ Public methods | 290 | 82.86% |
▷ Protected methods | 46 | 13.14% |
▷ Private methods | 14 | 4.00% |
Functions | 14 | |
▷ Named functions | 14 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 6 | 100.00% |
▷ Public constants | 6 | 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
8 PNG files occupy 0.82MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-2.png | 122.67KB | 50.64KB | ▼ 58.72% |
banner-772x250.png | 168.02KB | 56.59KB | ▼ 66.32% |
trunk/screenshot-3.png | 87.73KB | 31.32KB | ▼ 64.30% |
screenshot-3.png | 87.73KB | 31.32KB | ▼ 64.30% |
screenshot-1.png | 40.16KB | 19.46KB | ▼ 51.53% |