90% documentation

Code Review | Documentation

WordPress plugin Documentation scored90%from 54 tests.

About plugin

  • Plugin page: documentation
  • Plugin version: 1.11.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Nov 28, 2013
  • Latest release: Sep 22, 2022
  • Number of updates: 64
  • Update frequency: every 50.3 days
  • Top authors: itthinx (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

200+ active /19,641 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.44MB] [CPU: ▼1.03ms] Passed 4 tests

A check of server-side resources used by Documentation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3840.36 ▼3.89
Dashboard /wp-admin3.78 ▲0.4855.14 ▲5.58
Posts /wp-admin/edit.php3.84 ▲0.4854.36 ▲0.84
Add New Post /wp-admin/post-new.php6.46 ▲0.5793.54 ▼6.65
Media Library /wp-admin/upload.php3.64 ▲0.4143.05 ▲5.75
Settings /wp-admin/edit.php?post_type=document&page=documentation-settings3.6337.57
All Documents /wp-admin/edit.php?post_type=document3.6943.15
Add-Ons /wp-admin/edit.php?post_type=document&page=documentation-add-ons3.6135.14
Tags /wp-admin/edit-tags.php?taxonomy=document_tag&post_type=document3.6339.76
New Document /wp-admin/post-new.php?post_type=document6.4589.19
Categories /wp-admin/edit-tags.php?taxonomy=document_category&post_type=document3.6442.14

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 44 new files
Database: no new tables, 10 new options
New WordPress options
widget_documentation_document_children_widget
widget_theysaidso_widget
widget_documentation_document_hierarchy_widget
widget_documentation_documents_widget
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_documentation_categories_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Documentation
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲7413.30 ▼1.064.70 ▲2.6743.00 ▲3.20
Dashboard /wp-admin2,236 ▲485.79 ▲0.90102.86 ▼1.3877.51 ▲33.83
Posts /wp-admin/edit.php2,131 ▲422.01 ▼0.0235.83 ▼6.7532.69 ▼5.92
Add New Post /wp-admin/post-new.php1,558 ▲1623.34 ▲5.01785.47 ▲144.3462.92 ▲11.39
Media Library /wp-admin/upload.php1,421 ▲334.23 ▲0.01103.17 ▼3.9283.41 ▲39.03
Settings /wp-admin/edit.php?post_type=document&page=documentation-settings8652.0225.2231.32
All Documents /wp-admin/edit.php?post_type=document1,1621.9532.2235.69
Add-Ons /wp-admin/edit.php?post_type=document&page=documentation-add-ons9152.0224.5032.14
Tags /wp-admin/edit-tags.php?taxonomy=document_tag&post_type=document1,2792.1427.6830.86
New Document /wp-admin/post-new.php?post_type=document6,24523.92911.7332.20
Categories /wp-admin/edit-tags.php?taxonomy=document_category&post_type=document1,3042.1526.3630.50

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 10 options
    • can_compress_scripts
    • widget_documentation_categories_widget
    • widget_documentation_document_hierarchy_widget
    • db_upgraded
    • widget_documentation_documents_widget
    • widget_recent-comments
    • widget_documentation_document_children_widget
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots need descriptions #12, #13, #14, #15, #16, #17, #18 in documentation/assets to your readme.txt
Please take inspiration from this readme.txt

documentation/documentation.php Passed 13 tests

The main file in "Documentation" v. 1.11.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
34 characters long description:
A Documentation Management System.

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
There were no executable files found in this plugin2,532 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP174111,1282,301
CSS4076125
JavaScript2184289
Bourne Shell10017

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity25.60
▷ Minimum class complexity1.00
▷ Maximum class complexity96.00
Average method complexity4.84
▷ Minimum method complexity1.00
▷ Maximum method complexity59.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes15
▷ Abstract classes00.00%
▷ Concrete classes15100.00%
▷ Final classes00.00%
Methods96
▷ Static methods7679.17%
▷ Public methods9295.83%
▷ Protected methods00.00%
▷ Private methods44.17%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants24
▷ Global constants1041.67%
▷ Class constants1458.33%
▷ Public constants14100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
14 PNG files occupy 0.13MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/add-ons/groups.png5.75KB2.63KB▼ 54.21%
images/documentation.png0.34KB0.25KB▼ 26.74%
images/add-ons/woocommerce-documentation.png10.46KB4.18KB▼ 60.07%
images/add-ons/affiliates.png10.15KB4.46KB▼ 56.04%
images/add-ons/widgets-control.png8.58KB3.86KB▼ 54.96%