84% docket-connector

Code Review | Docket Connector

WordPress plugin Docket Connector scored84%from 54 tests.

About plugin

  • Plugin page: docket-connector
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.1.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.6
  • WordPress version: 6.3.1
  • First release: Jan 12, 2021
  • Latest release: Feb 23, 2021
  • Number of updates: 7
  • Update frequency: every 6.9 days
  • Top authors: cliffpaulick (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /507 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲1.81MB] [CPU: ▲9.34ms] Passed 4 tests

Server-side resources used by Docket Connector
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /5.25 ▲1.7952.68 ▲16.35
Dashboard /wp-admin5.12 ▲1.8160.97 ▲13.26
Posts /wp-admin/edit.php5.23 ▲1.8757.89 ▲8.58
Add New Post /wp-admin/post-new.php7.70 ▲1.81101.84 ▲1.28
Media Library /wp-admin/upload.php5.04 ▲1.8147.66 ▲14.22
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins5.1441.75

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 694 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Docket Connector
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8214.74 ▲0.371.97 ▲0.2844.40 ▼0.69
Dashboard /wp-admin2,234 ▲435.81 ▲0.94101.24 ▲0.2343.60 ▼1.07
Posts /wp-admin/edit.php2,128 ▲392.08 ▲0.0440.19 ▼2.9934.20 ▼4.36
Add New Post /wp-admin/post-new.php1,566 ▲3318.30 ▼4.92625.21 ▼6.1265.10 ▲19.86
Media Library /wp-admin/upload.php1,424 ▲334.32 ▲0.1496.73 ▼6.5544.50 ▼0.59
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins9692.0925.1431.12

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts

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
Good news, no errors were detected

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
  • 102× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Arrayy\\Collection\\Collection' not found in wp-content/plugins/docket-connector/vendor/voku/arrayy/src/Type/ScalarCollection.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'phpDocumentor\\Reflection\\Type' not found in wp-content/plugins/docket-connector/vendor/phpdocumentor/type-resolver/src/Types/Callable_.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'phpDocumentor\\Reflection\\DocBlock\\Tags\\Reference\\Reference' not found in wp-content/plugins/docket-connector/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Reference/Fqsen.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'phpDocumentor\\Reflection\\DocBlock\\Tags\\TagWithType' not found in wp-content/plugins/docket-connector/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/PropertyRead.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'phpDocumentor\\Reflection\\DocBlock\\Tags\\TagWithType' not found in wp-content/plugins/docket-connector/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Throws.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Arrayy\\Collection\\Collection' not found in wp-content/plugins/docket-connector/vendor/voku/arrayy/src/Type/InstancesCollection.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Defuse\\Crypto\\Exception\\CryptoException' not found in wp-content/plugins/docket-connector/vendor/defuse/php-encryption/src/Exception/EnvironmentIsBrokenException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'phpDocumentor\\Reflection\\Types\\AbstractList' not found in wp-content/plugins/docket-connector/vendor/phpdocumentor/type-resolver/src/Types/Collection.php:29
    • > PHP Fatal error
      require_once(): Failed opening required 'lib/byte_safe_strings.php' (include_path='.:/usr/share/php') in wp-content/plugins/docket-connector/vendor/paragonie/random_compat/psalm-autoload.php on line 3
    • > PHP Fatal error
      Cannot declare class DivisionByZeroError, because the name is already in use in wp-content/plugins/docket-connector/vendor/symfony/polyfill-php70/Resources/stubs/DivisionByZeroError.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: gravityforms, gravity forms, ecommerce, e-commerce

docket-connector/docket-connector.php Passed 13 tests

The primary PHP file in "Docket Connector" version 1.1.2 is used by WordPress to initiate all plugin functionality
62 characters long description:
Create invoices within your Docket account from Gravity Forms.

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin120,335 lines of code in 579 files:
LanguageFilesBlank linesComment linesLines of code
PHP4707,42727,10195,110
Markdown495,751515,376
PO File252,1332,9137,108
JSON26002,573
XML4111272
YAML16048
make19424
SVG10116
JavaScript1165
Bourne Shell1203

PHP code 0% from 2 tests

An overview of cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,466)
  • Method cyclomatic complexity should be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity26.49
▷ Minimum class complexity1.00
▷ Maximum class complexity1,466.00
Average method complexity3.61
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces37
Interfaces17
Traits0
Classes172
▷ Abstract classes63.49%
▷ Concrete classes16696.51%
▷ Final classes8249.40%
Methods2,042
▷ Static methods88843.49%
▷ Public methods1,80488.34%
▷ Protected methods572.79%
▷ Private methods1818.86%
Functions200
▷ Named functions10653.00%
▷ Anonymous functions9447.00%
Constants236
▷ Global constants5322.46%
▷ Class constants18377.54%
▷ Public constants183100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin