80% client-documentation

Code Review | Simple Documentation

WordPress plugin Simple Documentation scored80%from 54 tests.

About plugin

  • Plugin page: client-documentation
  • Plugin version: 1.2.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.6.0
  • WordPress version: 6.3.1
  • First release: Aug 21, 2013
  • Latest release: Jan 10, 2021
  • Number of updates: 134
  • Update frequency: every 20.2 days
  • Top authors: mathieuhays (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

400+ active /12,487 total downloads

Benchmarks

Plugin footprint 65% 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.14MB] [CPU: ▼5.69ms] Passed 4 tests

This is a short check of server-side resources used by Simple Documentation
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1336.96 ▼4.01
Dashboard /wp-admin3.48 ▲0.1752.54 ▲4.02
Posts /wp-admin/edit.php3.54 ▲0.1847.04 ▼6.85
Add New Post /wp-admin/post-new.php6.01 ▲0.1284.58 ▼15.44
Media Library /wp-admin/upload.php3.35 ▲0.1236.76 ▲3.53
Documentation /wp-admin/admin.php?page=simpledocumentation3.3938.10
Import / Export /wp-admin/admin.php?page=simpledocumentation_import_export3.3541.52
Settings /wp-admin/admin.php?page=simpledocumentation_settings3.3231.91

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 24 new files
Database: 1 new table, 6 new options
New tables
wp_simpledocumentation
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

Simple Documentation: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,052 ▲31714.75 ▲0.401.74 ▲0.0530.82 ▼14.68
Dashboard /wp-admin2,461 ▲2706.46 ▲1.63142.76 ▲32.1447.30 ▲3.29
Posts /wp-admin/edit.php2,124 ▲352.09 ▲0.0340.68 ▲0.2933.09 ▼5.40
Add New Post /wp-admin/post-new.php1,543 ▲1017.58 ▼5.56668.30 ▲56.9235.67 ▼26.42
Media Library /wp-admin/upload.php1,423 ▲354.06 ▼0.1983.87 ▼21.4040.96 ▼3.91
Documentation /wp-admin/admin.php?page=simpledocumentation1,6476.35124.7531.52
Import / Export /wp-admin/admin.php?page=simpledocumentation_import_export1,0253.0643.9031.53
Settings /wp-admin/admin.php?page=simpledocumentation_settings9172.0930.1926.69

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method simpleDocumentation::uninstall() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

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 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
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

client-documentation/client-documentation.php Passed 13 tests

The main file in "Simple Documentation" v. 1.2.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
97 characters long description:
This plugin helps webmasters/developers to provide documentation through the wordpress dashboard.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin2,877 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PO File6427555987
PHP5258151876
SVG100414
JavaScript111418335
CSS22611265

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity116.00
▷ Minimum class complexity116.00
▷ Maximum class complexity116.00
Average method complexity6.00
▷ Minimum method complexity1.00
▷ Maximum method complexity66.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1982.61%
▷ Protected methods00.00%
▷ Private methods417.39%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin