Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
- The plugin cannot be installed
- > Notice in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/class-documentpress.php+361
Undefined index: standard
Server metrics [RAM: ▲0.21MB] [CPU: ▼257.00ms] Passed 4 tests
Analyzing server-side resources used by DocumentPress
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.01 ▲0.29 | 36.64 ▲15.22 |
Dashboard /wp-admin | 3.31 ▲0.25 | 48.08 ▲4.19 |
Posts /wp-admin/edit.php | 3.35 ▲0.25 | 45.07 ▼0.67 |
Add New Post /wp-admin/post-new.php | 5.61 ▲0.18 | 94.60 ▼1,030.35 |
Media Library /wp-admin/upload.php | 3.18 ▲0.18 | 34.78 ▼1.18 |
DocumentPress Settings /wp-admin/options-general.php?page=documentpress_settings | 3.16 | 31.35 |
Server storage [IO: ▲7.29MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 232 new files
Database: no new tables, 1 new option
New WordPress options |
---|
documentpress_version |
Browser metrics Passed 4 tests
DocumentPress: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,818 ▲212 | 16.24 ▲0.36 | 11.12 ▲0.99 | 45.21 ▼3.83 |
Dashboard /wp-admin | 2,966 ▲113 | 6.00 ▲0.12 | 138.29 ▲9.69 | 104.87 ▼0.08 |
Posts /wp-admin/edit.php | 2,713 ▲7 | 2.70 ▲0.01 | 64.84 ▲3.20 | 93.80 ▲5.91 |
Add New Post /wp-admin/post-new.php | 1,661 ▲10 | 18.73 ▲1.67 | 346.72 ▼9.94 | 108.10 ▲2.30 |
Media Library /wp-admin/upload.php | 1,779 ▲7 | 5.02 ▲0.01 | 139.78 ▼10.17 | 110.79 ▼8.74 |
DocumentPress Settings /wp-admin/options-general.php?page=documentpress_settings | 1,305 | 3.54 | 81.46 | 71.95 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- This plugin did not uninstall successfully, leaving 1 option in the database
- documentpress_version
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
- > GET request to /wp-admin/options-general.php?page=documentpress_settings
- > Notice in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/class-documentpress-settings.php+291
Undefined index: tab
- > GET request to /wp-admin/options-general.php?page=documentpress_settings
- > Notice in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/class-documentpress-settings.php+291
Undefined index:
- > GET request to /wp-admin/options-general.php?page=documentpress_settings
- > Notice in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/class-documentpress-settings.php+291
Trying to access array offset on value of type null
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
Please fix the following
- 10× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/examples/multi-api.php
- > /wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/examples/service-account.php
- > /wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/examples/batch.php
- > /wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/tests/OAuthHelper.php
- > /wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/examples/user-example.php
- > /wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/examples/index.php
- > /wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/examples/idtoken.php
- > /wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/examples/simple-query.php
- > /wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/examples/fileupload.php
- > /wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/examples/simplefileupload.php
- 118× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/src/Google/Service/DoubleClickBidManager.php:31
- > PHP Fatal error
Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/src/Google/Service/IdentityToolkit.php:31
- > PHP Fatal error
Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/src/Google/Service/Replicapool.php:32
- > PHP Fatal error
Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/src/Google/Service/AdExchangeSeller.php:32
- > PHP Fatal error
Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/src/Google/Service/Clouddebugger.php:32
- > PHP Fatal error
Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/src/Google/Service/Directory.php:33
- > PHP Fatal error
Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/src/Google/Service/GamesManagement.php:31
- > PHP Fatal error
Uncaught Error: Class 'BaseTest' not found in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/tests/general/ApiMediaFileUploadTest.php:21
- > PHP Fatal error
Uncaught Error: Class 'Google_Service' not found in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/src/Google/Service/GroupsMigration.php:31
- > PHP Fatal error
Uncaught Error: Class 'google\\appengine\\api\\app_identity\\AppIdentityService' not found in wp-content/plugins/documentpress-display-any-document-on-your-site/includes/vendor/google/apiclient/src/Google/Auth/AppIdentity.php:79
- > 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 Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: template, plugin, wordpress
documentpress-display-any-document-on-your-site/documentpress.php 85% from 13 tests
The main PHP script in "DocumentPress" version 2.1 is automatically included on every request by WordPress
You should first fix the following items:
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("documentpress-display-any-document-on-your-site.php" instead of "documentpress.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected200,004 lines of code in 211 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 190 | 13,178 | 38,137 | 199,364 |
JavaScript | 7 | 47 | 153 | 230 |
XML | 2 | 28 | 41 | 122 |
JSON | 5 | 0 | 0 | 87 |
CSS | 1 | 16 | 14 | 83 |
Markdown | 2 | 49 | 0 | 78 |
YAML | 1 | 9 | 2 | 32 |
INI | 1 | 0 | 1 | 6 |
SVG | 2 | 0 | 0 | 2 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.02 |
Average class complexity | 1.23 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 62.00 |
Average method complexity | 1.03 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 44.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 3,576 | |
▷ Abstract classes | 6 | 0.17% |
▷ Concrete classes | 3,570 | 99.83% |
▷ Final classes | 0 | 0.00% |
Methods | 27,707 | |
▷ Static methods | 18 | 0.06% |
▷ Public methods | 27,608 | 99.64% |
▷ Protected methods | 31 | 0.11% |
▷ Private methods | 68 | 0.25% |
Functions | 16 | |
▷ Named functions | 9 | 56.25% |
▷ Anonymous functions | 7 | 43.75% |
Constants | 298 | |
▷ Global constants | 1 | 0.34% |
▷ Class constants | 297 | 99.66% |
▷ Public constants | 297 | 100.00% |
Plugin size Passed 1 test
Image compression Passed 1 test
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/howto1.png | 8.63KB | 4.84KB | ▼ 43.85% |
assets/images/howto2.png | 19.01KB | 6.65KB | ▼ 65.01% |
assets/images/logo.png | 15.44KB | 5.17KB | ▼ 66.51% |
assets/images/howto3.png | 19.01KB | 6.65KB | ▼ 65.01% |