73% wp-documentation-lite

Code Review | WP Documentation Lite

WordPress plugin WP Documentation Lite scored 73% from 54 tests.

About plugin

  • Plugin page: wp-documentation-...
  • Plugin version: 0.0.6
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.9
  • WordPress version: 6.3.1
  • First release: Jul 15, 2016
  • Latest release: Feb 1, 2022
  • Number of updates: 9
  • Update frequency: every 225.5 days
  • Top authors: wptravel (77.78%)WEN Solutions (33.33%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 5,713 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.83ms] Passed 4 tests

A check of server-side resources used by WP Documentation Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0843.38 ▼0.70
Dashboard /wp-admin3.38 ▲0.0845.08 ▼2.93
Posts /wp-admin/edit.php3.44 ▲0.0848.20 ▲2.24
Add New Post /wp-admin/post-new.php5.96 ▲0.0783.87 ▼9.91
Media Library /wp-admin/upload.php3.30 ▲0.0735.59 ▲3.04
All Documentations /wp-admin/edit.php?post_type=wp_documentation3.3537.81
Add New /wp-admin/post-new.php?post_type=wp_documentation3.4546.75

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 69 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
wp_documentation_version
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP Documentation Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲9913.25 ▼1.131.72 ▼0.3543.75 ▼8.50
Dashboard /wp-admin2,237 ▲494.85 ▼0.2497.22 ▼3.8239.67 ▼2.74
Posts /wp-admin/edit.php2,123 ▲342.01 ▲0.0139.16 ▲3.4335.14 ▲0.86
Add New Post /wp-admin/post-new.php1,540 ▲617.73 ▼5.56591.21 ▼78.4460.38 ▲7.08
Media Library /wp-admin/upload.php1,422 ▲344.19 ▲0.0199.06 ▼0.9741.20 ▼2.21
All Documentations /wp-admin/edit.php?post_type=wp_documentation1,0841.9930.7429.58
Settings /wp-admin/class-wp-documentation-admin.php260.440.1015.56
Add New /wp-admin/post-new.php?post_type=wp_documentation1,9112.7853.5294.34

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • wp_documentation_version
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-documentation-lite/public/partials/wp-documentation-public-display.php
    • > /wp-content/plugins/wp-documentation-lite/templates/global/wrapper-end.php
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_settings_section() in wp-content/plugins/wp-documentation-lite/admin/class-wp-documentation-admin-permalink-settings.php:36
    • > PHP Fatal error
      Uncaught Error: Call to a member function frontend_document_list() on null in wp-content/plugins/wp-documentation-lite/templates/single-wp_documentation/main-documentation-content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-documentation-lite/admin/partials/wp_docs.php:2
    • > PHP Notice
      Undefined variable: callback in wp-content/plugins/wp-documentation-lite/templates/single-wp_documentation/main-documentation-content.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/wp-documentation-lite/templates/content-single-wp_documentation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/wp-documentation-lite/admin/partials/wp_doc_title.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Documentation_Options' not found in wp-content/plugins/wp-documentation-lite/admin/partials/wp_doc_settings.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function post_password_required() in wp-content/plugins/wp-documentation-lite/templates/comments-wp-documentation.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-documentation-lite/templates/loop/content.php:3
    • > PHP Notice
      Undefined variable: content_width in wp-content/plugins/wp-documentation-lite/templates/single-wp_documentation/main-documentation-content.php on line 1

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/class-wp-documentation-admin.php
    • > Network (severe)
    wp-admin/class-wp-documentation-admin.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (23 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

wp-documentation-lite/wp-documentation-lite.php Passed 13 tests

The main file in "WP Documentation Lite" v. 0.0.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
55 characters long description:
Creating online documentation has never been this easy!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin3,430 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP284208281,483
CSS71491121,100
JavaScript13177133827
SVG18020

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.33
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods68
▷ Static methods34.41%
▷ Public methods6088.24%
▷ Protected methods00.00%
▷ Private methods811.76%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
6 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/default-archive-thumbnail.png3.40KB1.43KB▼ 58.03%
admin/images/docico.png7.15KB3.26KB▼ 54.48%
admin/images/update.png3.97KB1.41KB▼ 64.52%
admin/images/help.png8.58KB3.63KB▼ 57.74%
admin/images/ui-icons_222222_256x240.png6.68KB4.20KB▼ 37.05%