67% wp-docs

Code Review | WP Docs

WordPress plugin WP Docs scored 67% from 54 tests.

About plugin

  • Plugin page: wp-docs
  • Plugin version: 2.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Feb 9, 2016
  • Latest release: Aug 2, 2023
  • Number of updates: 127
  • Update frequency: every 21.5 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active / 37,887 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.75ms] Passed 4 tests

Server-side resources used by WP Docs
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1840.00 ▼1.50
Dashboard /wp-admin3.34 ▲0.0446.86 ▼6.39
Posts /wp-admin/edit.php3.39 ▲0.0448.16 ▼0.44
Add New Post /wp-admin/post-new.php5.92 ▲0.0494.53 ▲1.34
Media Library /wp-admin/upload.php3.26 ▲0.0437.55 ▲3.50
WP Docs /wp-admin/options-general.php?page=wpdocs3.5335.33

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 110 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
wpdocs_options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

WP Docs: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.16 ▼1.201.66 ▼0.2239.85 ▼6.49
Dashboard /wp-admin2,213 ▲254.79 ▼0.20108.67 ▼6.9940.65 ▼5.17
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0139.87 ▲3.8734.23 ▲0.77
Add New Post /wp-admin/post-new.php1,548 ▲1118.06 ▼5.08605.23 ▼66.2260.36 ▲2.36
Media Library /wp-admin/upload.php1,395 ▲74.23 ▲0.0694.10 ▲0.5840.46 ▼4.06
WP Docs /wp-admin/options-general.php?page=wpdocs1,9875.00152.77180.72

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • wpdocs_options
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=wpdocs
    • > Notice in wp-content/plugins/wp-docs/inc/common.php+39
    Undefined variable: wpdocs_premium_link
  • 52 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=wpdocs
    • > POST request to /wp-admin/admin-ajax.php
    • > Notice in wp-content/plugins/wp-docs/inc/functions.php+1931
    Undefined index: allowed_role

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-docs/index.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/wp-docs/inc/functions.php:112
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_docs_whiteflag_memphis_htaccess() in wp-content/plugins/wp-docs/inc/wpdocs_settings.php:107
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-docs/inc/common.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please fix the following user-side errors
    • > GET request to /wp-admin/options-general.php?page=wpdocs
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wpdocs 605 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=wpdocs
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wpdocs 611 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=wpdocs
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wpdocs 618 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
    • > GET request to /wp-admin/options-general.php?page=wpdocs
    • > Rendering (warning) in unknown
    /wp-admin/options-general.php?page=wpdocs 625 The specified value "" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.

Optimizations

Plugin configuration 96% 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
7 plugin tags: memphis-documents-library, gallery, directory, documents, wp docs...

wp-docs/index.php 92% from 13 tests

The entry point to "WP Docs" version 2.0.3 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-docs.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected16,181 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
SVG30129,445
PHP51,2621522,543
CSS7148772,061
PO File46981,1361,123
JavaScript54351601,009

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions81
▷ Named functions7896.30%
▷ Anonymous functions33.70%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
64 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/filetype-icons/wav.png0.80KB0.57KB▼ 28.50%
img/filetype-icons/iso.png0.68KB0.47KB▼ 31.53%
img/filetype-icons/mp3.png0.71KB0.50KB▼ 29.89%
img/filetype-icons/mov.png0.74KB0.54KB▼ 27.31%
img/filetype-icons/mpeg.png0.76KB0.55KB▼ 27.45%