79% docupress

Code Review | DocuPress

WordPress plugin DocuPress scored79%from 54 tests.

About plugin

  • Plugin page: docupress
  • Plugin version: 3.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.2.2
  • WordPress version: 6.3.1
  • First release: May 9, 2017
  • Latest release: May 31, 2023
  • Number of updates: 30
  • Update frequency: every 73.8 days
  • Top authors: deviodigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /3,645 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▼1.99ms] Passed 4 tests

An overview of server-side resources used by DocuPress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2843.74 ▼4.05
Dashboard /wp-admin3.58 ▲0.2360.32 ▼2.13
Posts /wp-admin/edit.php3.71 ▲0.3562.90 ▲15.75
Add New Post /wp-admin/post-new.php6.29 ▲0.4190.06 ▼8.62
Media Library /wp-admin/upload.php3.51 ▲0.2843.92 ▲6.83
Add New /wp-admin/post-new.php?post_type=docupress6.2986.66
Collections /wp-admin/edit-tags.php?taxonomy=docupress_collections&post_type=docupress3.4937.82
All Articles /wp-admin/edit.php?post_type=docupress3.5642.09

Server storage [IO: ▲0.18MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 47 new files
Database: no new tables, 9 new options
New WordPress options
widget_docupress_collections_widget
theysaidso_admin_options
widget_docupress_articles_widget
widget_docupress_related_articles_widget
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for DocuPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,193 ▲43220.46 ▲6.096.09 ▲4.1344.08 ▲0.02
Dashboard /wp-admin2,485 ▲31410.50 ▲4.90249.31 ▲150.0042.17 ▲1.34
Posts /wp-admin/edit.php2,356 ▲2569.46 ▲7.4691.33 ▲55.3037.32 ▼0.56
Add New Post /wp-admin/post-new.php6,231 ▲4,69618.73 ▲0.68811.37 ▲197.2238.25 ▼37.28
Media Library /wp-admin/upload.php1,818 ▲41810.99 ▲6.74147.36 ▲45.7939.45 ▼9.45
Add New /wp-admin/post-new.php?post_type=docupress6,30920.18815.1335.71
Collections /wp-admin/edit-tags.php?taxonomy=docupress_collections&post_type=docupress1,5489.2090.3732.47
All Articles /wp-admin/edit.php?post_type=docupress1,3859.3982.8531.81

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 9 options in the database
    • widget_theysaidso_widget
    • widget_docupress_collections_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_docupress_related_articles_widget
    • widget_docupress_articles_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/docupress/admin/partials/docupress-admin-display.php
    • > /wp-content/plugins/docupress/public/partials/docupress-public-display.php
  • 11× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/docupress/admin/docupress-taxonomies.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/docupress/admin/docupress-shortcodes.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/docupress/docupress.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/docupress/uninstall.php:31
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/docupress/admin/docupress-estimated-reading-time.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/docupress/admin/docupress-cpt.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/docupress/admin/class-docupress-settings.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/docupress/admin/docupress-article-ratings.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/docupress/admin/docupress-metaboxes.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_die() in wp-content/plugins/docupress/admin/docupress-helper-functions.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
8 plugin tags: help, kb, support, notes, knowledgebase...

docupress/docupress.php Passed 13 tests

This is the main PHP file of "DocuPress" version 3.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
25 characters long description:
Documentation simplified.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin2,068 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP21275972861
PO File4261273682
JavaScript24320286
CSS35413209
SVG48027
Markdown1203

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity4.09
▷ Minimum class complexity1.00
▷ Maximum class complexity12.00
Average method complexity1.85
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods40
▷ Static methods25.00%
▷ Public methods3587.50%
▷ Protected methods00.00%
▷ Private methods512.50%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin