84% docu

Code Review | Docu

WordPress plugin Docu scored84%from 54 tests.

About plugin

  • Plugin page: docu
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9
  • WordPress version: 6.3.1
  • First release: Jan 26, 2015
  • Latest release: May 3, 2018
  • Number of updates: 21
  • Update frequency: every 56.8 days
  • Top authors: dinamiko (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /3,434 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼0.80ms] Passed 4 tests

This is a short check of server-side resources used by Docu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.65 ▲0.1837.99 ▲1.60
Dashboard /wp-admin3.46 ▲0.1545.25 ▼2.79
Posts /wp-admin/edit.php3.58 ▲0.2249.15 ▲2.80
Add New Post /wp-admin/post-new.php6.06 ▲0.1790.46 ▼4.81
Media Library /wp-admin/upload.php3.38 ▲0.1537.07 ▲6.70
All Docs /wp-admin/edit.php?post_type=doc3.4337.71
Add New /wp-admin/post-new.php?post_type=doc3.5150.13
Categories /wp-admin/edit-tags.php?taxonomy=doc_category&post_type=doc3.3834.25

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
widget_docu_widget

Browser metrics Passed 4 tests

Checking browser requirements for Docu
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲18113.75 ▼0.807.93 ▲6.2038.47 ▼6.94
Dashboard /wp-admin2,244 ▲535.88 ▼0.0098.40 ▼8.9839.35 ▼2.77
Posts /wp-admin/edit.php2,127 ▲382.05 ▲0.0336.38 ▲1.5634.85 ▲2.33
Add New Post /wp-admin/post-new.php1,553 ▲2018.51 ▼4.74659.98 ▲43.4273.39 ▲19.00
Media Library /wp-admin/upload.php1,423 ▲324.25 ▲0.0596.73 ▲0.2041.74 ▼2.02
All Docs /wp-admin/edit.php?post_type=doc1,0982.3737.8928.10
Add New /wp-admin/post-new.php?post_type=doc2,3257.68181.8562.78
Categories /wp-admin/edit-tags.php?taxonomy=doc_category&post_type=doc1,3002.1526.9026.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_docu_widget
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function docu_get_prevnext_links() in wp-content/plugins/docu/templates/docu-prevnext-nav.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/docu/templates/docu-search-form.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/docu/templates/docu-index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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 uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Docu Index page), #2 (Docu Single document), #3 (Docu Single in admin), #4 (Docu Sidebar Widget)
The official readme.txt might help

docu/docu.php Passed 13 tests

The principal PHP file in "Docu" v. 1.5 is loaded by WordPress automatically on each request
29 characters long description:
A simple Documentation Plugin

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
Success! There were no dangerous files found in this plugin1,320 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP13470235789
CSS26320379
PO File1303179
JavaScript656673

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity8.75
▷ Minimum class complexity7.00
▷ Maximum class complexity12.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes125.00%
Methods20
▷ Static methods15.00%
▷ Public methods1260.00%
▷ Protected methods630.00%
▷ Private methods210.00%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
No PNG files were detected