83% docket-wp

Code Review | Docket WP

WordPress plugin Docket WP scored 83% from 54 tests.

About plugin

  • Plugin page: docket-wp
  • Plugin version: 1.1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6.1
  • WordPress version: 5.8.1
  • First release: Aug 8, 2020
  • Latest release: Aug 11, 2021
  • Number of updates: 38
  • Update frequency: every 9.8 days
  • Top authors: 2winfactor (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

1,000+ active / 6,572 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▼136.64ms] Passed 4 tests

Analyzing server-side resources used by Docket WP
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.24 ▲0.4043.08 ▲8.98
Dashboard /wp-admin3.47 ▲0.4247.36 ▲3.70
Posts /wp-admin/edit.php3.52 ▲0.4247.09 ▲2.84
Add New Post /wp-admin/post-new.php5.77 ▲0.3493.25 ▼550.25
Media Library /wp-admin/upload.php3.35 ▲0.3535.02 ▼2.84
Docket WP /wp-admin/options-general.php?page=docket-wp3.3330.11

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 108 new files
Database: no new tables, 1 new option
New WordPress options
dwp_install_id

Browser metrics Passed 4 tests

A check of browser resources used by Docket WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,845 ▲24922.74 ▲7.1242.14 ▲32.0343.23 ▼3.87
Dashboard /wp-admin3,012 ▲818.79 ▲2.79156.04 ▲10.77115.10 ▲4.27
Posts /wp-admin/edit.php2,780 ▲416.04 ▲3.3591.44 ▲20.06112.74 ▲25.90
Add New Post /wp-admin/post-new.php1,524 ▼14619.41 ▲0.12365.54 ▼21.39142.88 ▲26.82
Media Library /wp-admin/upload.php1,851 ▲477.20 ▲2.17149.41 ▼15.25118.29 ▼6.34
Docket WP /wp-admin/options-general.php?page=docket-wp1,1465.8489.2194.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • dwp_install_id

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not 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
Please fix the following
  • 21× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Imposter\\FilesystemInterface' not found in wp-content/plugins/docket-wp/vendor/typisttech/imposter/src/Filesystem.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'DiceTest' not found in wp-content/plugins/docket-wp/vendor/level-2/dice/tests/ShareInstancesTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'DiceTest' not found in wp-content/plugins/docket-wp/vendor/level-2/dice/tests/NamespaceTest.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Imposter\\ImposterInterface' not found in wp-content/plugins/docket-wp/vendor/typisttech/imposter/src/Imposter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Imposter\\ConfigCollectionInterface' not found in wp-content/plugins/docket-wp/vendor/typisttech/imposter/src/ConfigCollection.php:7
    • > PHP Warning
      require_once(Dice.php): failed to open stream: No such file or directory in wp-content/plugins/docket-wp/vendor/level-2/dice/tests/bootstrap.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'DiceTest' not found in wp-content/plugins/docket-wp/vendor/level-2/dice/tests/NamedInstancesTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'DiceTest' not found in wp-content/plugins/docket-wp/vendor/level-2/dice/tests/BasicTest.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Imposter\\TransformerInterface' not found in wp-content/plugins/docket-wp/vendor/typisttech/imposter/src/Transformer.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_User' not found in wp-content/plugins/docket-wp/inc/Models/User.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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 lack descriptions #1, #2, #3, #4, #5, #6, #7, #8 in docket-wp/assets to your readme.txt
You can look at the official readme.txt

docket-wp/docket-wp.php 85% from 13 tests

The entry point to "Docket WP" version 1.1.4 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages")

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
Good job! No executable or dangerous file extensions detected5,316 lines of code in 99 files:
LanguageFilesBlank linesComment linesLines of code
PHP649841,2073,762
Markdown73980780
JSON600517
JavaScript17122,330151
XML393103
CSS20343

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity3.42
▷ Minimum class complexity1.00
▷ Maximum class complexity73.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces15
Interfaces8
Traits1
Classes115
▷ Abstract classes10.87%
▷ Concrete classes11499.13%
▷ Final classes00.00%
Methods337
▷ Static methods3510.39%
▷ Public methods31091.99%
▷ Protected methods51.48%
▷ Private methods226.53%
Functions24
▷ Named functions14.17%
▷ Anonymous functions2395.83%
Constants8
▷ Global constants225.00%
▷ Class constants675.00%
▷ Public constants583.33%

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