68% wdv-one-page-docs

Code Review | WDV One Page Docs - Documentation Plugin for WordPress

WordPress plugin WDV One Page Docs - Documentation Plugin for WordPress scored68%from 54 tests.

About plugin

  • Plugin page: wdv-one-page-docs
  • Plugin version: 1.2.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Jun 12, 2020
  • Latest release: May 2, 2023
  • Number of updates: 34
  • Update frequency: every 31.0 days
  • Top authors: vrpr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /806 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.19MB] [CPU: ▲1.29ms] Passed 4 tests

Analyzing server-side resources used by WDV One Page Docs - Documentation Plugin for WordPress
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1739.81 ▼3.96
Dashboard /wp-admin3.47 ▲0.1751.64 ▲0.86
Posts /wp-admin/edit.php3.59 ▲0.2353.47 ▲5.14
Add New Post /wp-admin/post-new.php6.20 ▲0.3196.90 ▲4.06
Media Library /wp-admin/upload.php3.40 ▲0.1741.60 ▲4.19

Server storage [IO: ▲9.63MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
It is recommended to fix the following issues
  • You have illegally modified 1 file (4.00KB) outside of "wp-content/plugins/wdv-one-page-docs/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 72 new files
Database: 2 new tables, 7 new options
New tables
wp_wdv_one_page_settings
wp_wdv_one_page_shortcodes
New WordPress options
db_upgraded
wdv_docs_db_version
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for WDV One Page Docs - Documentation Plugin for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲13413.56 ▼0.815.51 ▲2.9843.76 ▼1.66
Dashboard /wp-admin2,240 ▲345.85 ▲0.96104.73 ▼10.7846.09 ▲2.18
Posts /wp-admin/edit.php2,122 ▲192.03 ▼0.0042.36 ▲8.7336.11 ▼1.31
Add New Post /wp-admin/post-new.php1,543 ▲1223.13 ▲0.04645.42 ▲24.7452.05 ▼22.95
Media Library /wp-admin/upload.php1,422 ▲254.29 ▲0.11104.32 ▼31.9143.12 ▼12.02

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie tables were found after uninstall: 2 tables
    • wp_wdv_one_page_settings
    • wp_wdv_one_page_shortcodes
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • wdv_docs_db_version

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wdv-one-page-docs/admin/partials/wdv-one-page-docs-admin-display.php
    • > /wp-content/plugins/wdv-one-page-docs/public/partials/wdv-one-page-docs-public-display.php
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/wdv-one-page-docs/includes/class-wdv-one-page-rest-posts-controller.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post() in wp-content/plugins/wdv-one-page-docs/public/partials/wdv-one-page-docs-public-wdv-doc-shortcode-display.php:24
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wdv-one-page-docs/public/partials/wdv-one-page-docs-public-wdv-doc-shortcode-display.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wdv-one-page-docs/admin/partials/wdv-one-page-docs-admin-dashboard-display.php:19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wdv-one-page-docs/public/partials/wdv-one-page-docs-public-wdv-docs-shortcode-display.php on line 20
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/wdv-one-page-docs/public/partials/wdv-one-page-docs-public-wdv-docs-shortcode-display.php:38

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: faq, documentation, document, support, knowledge base...

wdv-one-page-docs/wdv-one-page-docs.php Passed 13 tests

The main PHP script in "WDV One Page Docs - Documentation Plugin for WordPress" version 1.2.2 is automatically included on every request by WordPress
45 characters long description:
A one page documentation plugin for WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,228 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
PHP194189701,034
CSS61310117
HTML30045
JavaScript1985432

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity4.36
▷ Minimum class complexity1.00
▷ Maximum class complexity22.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods62
▷ Static methods34.84%
▷ Public methods5385.48%
▷ Protected methods46.45%
▷ Private methods58.06%
Functions7
▷ Named functions342.86%
▷ Anonymous functions457.14%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/partials/img/logo-new.png24.33KB12.27KB▼ 49.58%
admin/partials/img/logo.png26.77KB12.42KB▼ 53.62%