WordPress plugin DocumentPress scored 10% from 53 tests.

About plugin

  • Plugin page: documentpress-dis...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 5.8.1
  • First release: Jan 28, 2016
  • Latest release: Dec 24, 2017
  • Number of updates: 14
  • Update frequency: every 49.8 days
  • Top authors: fifthsegment (100%)

Code review

53 tests

User reviews

2 reviews

Install metrics

400+ active / 6,742 total downloads

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
PageMemory (MB)CPU Time (ms)
Home /3.01 ▲0.2936.64 ▲15.22
Dashboard /wp-admin3.31 ▲0.2548.08 ▲4.19
Posts /wp-admin/edit.php3.35 ▲0.2545.07 ▼0.67
Add New Post /wp-admin/post-new.php5.61 ▲0.1894.60 ▼1,030.35
Media Library /wp-admin/upload.php3.18 ▲0.1834.78 ▼1.18
DocumentPress Settings /wp-admin/options-general.php?page=documentpress_settings3.1631.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
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,818 ▲21216.24 ▲0.3611.12 ▲0.9945.21 ▼3.83
Dashboard /wp-admin2,966 ▲1136.00 ▲0.12138.29 ▲9.69104.87 ▼0.08
Posts /wp-admin/edit.php2,713 ▲72.70 ▲0.0164.84 ▲3.2093.80 ▲5.91
Add New Post /wp-admin/post-new.php1,661 ▲1018.73 ▲1.67346.72 ▼9.94108.10 ▲2.30
Media Library /wp-admin/upload.php1,779 ▲75.02 ▲0.01139.78 ▼10.17110.79 ▼8.74
DocumentPress Settings /wp-admin/options-general.php?page=documentpress_settings1,3053.5481.4671.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

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:
LanguageFilesBlank linesComment linesLines of code
PHP19013,17838,137199,364
JavaScript747153230
XML22841122
JSON50087
CSS1161483
Markdown249078
YAML19232
INI1016
SVG2002

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 code0.02
Average class complexity1.23
▷ Minimum class complexity1.00
▷ Maximum class complexity62.00
Average method complexity1.03
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces1
Interfaces1
Traits0
Classes3,576
▷ Abstract classes60.17%
▷ Concrete classes3,57099.83%
▷ Final classes00.00%
Methods27,707
▷ Static methods180.06%
▷ Public methods27,60899.64%
▷ Protected methods310.11%
▷ Private methods680.25%
Functions16
▷ Named functions956.25%
▷ Anonymous functions743.75%
Constants298
▷ Global constants10.34%
▷ Class constants29799.66%
▷ Public constants297100.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
FileSize - originalSize - compressedSavings
assets/images/howto1.png8.63KB4.84KB▼ 43.85%
assets/images/howto2.png19.01KB6.65KB▼ 65.01%
assets/images/logo.png15.44KB5.17KB▼ 66.51%
assets/images/howto3.png19.01KB6.65KB▼ 65.01%