83% paperdork

Code Review | Paperdork voor WooCommerce

WordPress plugin Paperdork voor WooCommerce scored 83% from 54 tests.

About plugin

  • Plugin page: paperdork
  • Plugin version: 1.7.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 7.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 7, 2021
  • Latest release: May 5, 2023
  • Number of updates: 91
  • Update frequency: every 6.7 days
  • Top authors: paperdork (54.95%)roefja (46.15%)

Code review

54 tests

User reviews

1 review

Install metrics

80+ active / 3,831 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.56MB] [CPU: ▲12.32ms] Passed 4 tests

A check of server-side resources used by Paperdork voor WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5859.76 ▲19.03
Dashboard /wp-admin3.87 ▲0.5761.97 ▲10.90
Posts /wp-admin/edit.php3.90 ▲0.5564.80 ▲17.23
Add New Post /wp-admin/post-new.php6.47 ▲0.5899.10 ▲2.22
Media Library /wp-admin/upload.php3.79 ▲0.5652.73 ▲18.93

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 327 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Paperdork voor WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,910 ▲15313.84 ▼0.536.16 ▲4.2337.52 ▼5.81
Dashboard /wp-admin2,210 ▲214.88 ▼0.29109.45 ▼0.0139.53 ▼1.26
Posts /wp-admin/edit.php2,093 ▲42.04 ▲0.0040.55 ▲4.0936.13 ▲2.24
Add New Post /wp-admin/post-new.php1,518 ▼317.38 ▼5.68680.98 ▲2.4155.08 ▼0.50
Media Library /wp-admin/upload.php1,386 ▼54.23 ▼0.0195.04 ▼4.3643.09 ▼0.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
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
Almost there! Just fix the following items
  • 163× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/paperdork/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/paperdork/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/paperdork/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/paperdork/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/paperdork/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/paperdork/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'League\\OAuth2\\Client\\Grant\\AbstractGrant' not found in wp-content/plugins/paperdork/vendor/league/oauth2-client/src/Grant/Password.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/paperdork/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/paperdork/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/paperdork/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: facturen, paperdork, invoices

paperdork/functions.php 85% from 13 tests

Analyzing the main PHP file in "Paperdork voor WooCommerce" version 1.7.1
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("paperdork.php" instead of "functions.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 209 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected37,034 lines of code in 310 files:
LanguageFilesBlank linesComment linesLines of code
PHP2683,2938,07831,584
Markdown141,17703,488
JSON13101,582
YAML8536214
CSS124871
JavaScript3241963
XML10019
Dockerfile18010
Bourne Shell1203

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity9.75
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity3.05
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces21
Interfaces19
Traits9
Classes211
▷ Abstract classes31.42%
▷ Concrete classes20898.58%
▷ Final classes2411.54%
Methods1,080
▷ Static methods16415.19%
▷ Public methods82576.39%
▷ Protected methods1059.72%
▷ Private methods15013.89%
Functions174
▷ Named functions7341.95%
▷ Anonymous functions10158.05%
Constants204
▷ Global constants7938.73%
▷ Class constants12561.27%
▷ Public constants125100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin