78% boekuwzending-for-woocommerce

Code Review | Boekuwzending for Woocommerce

WordPress plugin Boekuwzending for Woocommerce scored78%from 54 tests.

About plugin

  • Plugin page: boekuwzending-for...
  • Plugin version: 2.2.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 3, 2020
  • Latest release: Feb 7, 2023
  • Number of updates: 41
  • Update frequency: every 20.6 days
  • Top authors: margreetbalder (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /2,507 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.63ms] Passed 4 tests

This is a short check of server-side resources used by Boekuwzending for Woocommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.23 ▲4.03
Dashboard /wp-admin3.31 ▲0.0152.95 ▲4.74
Posts /wp-admin/edit.php3.37 ▲0.0151.34 ▼5.66
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.71 ▼8.20
Media Library /wp-admin/upload.php3.24 ▲0.0136.85 ▼4.69

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 1,785 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Boekuwzending for Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.35 ▲0.001.70 ▲0.0842.75 ▼2.24
Dashboard /wp-admin2,205 ▲285.50 ▼0.1583.32 ▼9.0142.11 ▲0.64
Posts /wp-admin/edit.php2,110 ▲71.98 ▼0.0340.69 ▼2.1437.64 ▲0.25
Add New Post /wp-admin/post-new.php1,547 ▲2118.01 ▼5.47603.53 ▼59.9769.18 ▲10.10
Media Library /wp-admin/upload.php1,413 ▲164.22 ▼0.0395.83 ▼8.9244.74 ▼0.49

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
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 4× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/boekuwzending-for-woocommerce/templates/checkout/pick_up_point/information.php
    • > /wp-content/plugins/boekuwzending-for-woocommerce/templates/thank_you/information_delivery.php
    • > /wp-content/plugins/boekuwzending-for-woocommerce/templates/thank_you/information_pick_up_point.php
    • > /wp-content/plugins/boekuwzending-for-woocommerce/templates/admin/order/edit/meta/render.php
  • 130× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpClient\\Chunk\\DataChunk' not found in wp-content/plugins/boekuwzending-for-woocommerce/vendor/symfony/http-client/Chunk/InformationalChunk.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/boekuwzending-for-woocommerce/templates/admin/order/edit/meta/no_products.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'Boekuwzending\\Serializer\\SerializerInterface' not found in wp-content/plugins/boekuwzending-for-woocommerce/vendor/boekuwzending/php-sdk/src/Serializer/InstructionSerializer.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/boekuwzending-for-woocommerce/templates/admin/order/edit/meta/status.php:57
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpClient\\Chunk\\DataChunk' not found in wp-content/plugins/boekuwzending-for-woocommerce/vendor/symfony/http-client/Chunk/FirstChunk.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Boekuwzending\\Serializer\\SerializerInterface' not found in wp-content/plugins/boekuwzending-for-woocommerce/vendor/boekuwzending/php-sdk/src/Serializer/RateSerializer.php:17
    • > PHP Fatal error
      Uncaught LogicException: You cannot use the "Symfony\\Component\\HttpClient\\Psr18Client" as the "psr/http-factory" package is not installed. Try running "composer require nyholm/psr7". in wp-content/plugins/boekuwzending-for-woocommerce/vendor/symfony/http-client/Psr18Client.php:37
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Contracts\\HttpClient\\ResponseInterface' not found in wp-content/plugins/boekuwzending-for-woocommerce/vendor/symfony/http-client/Response/AsyncResponse.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\HttpKernel\\DataCollector\\DataCollector' not found in wp-content/plugins/boekuwzending-for-woocommerce/vendor/symfony/http-client/DataCollector/HttpClientDataCollector.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Boekuwzending\\Resource\\Contact' not found in wp-content/plugins/boekuwzending-for-woocommerce/vendor/boekuwzending/php-sdk/src/Resource/OrderContact.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Contributors: The plugin contributors field is not present
You can take inspiration from this readme.txt

boekuwzending-for-woocommerce/boekuwzending-for-woocommerce.php Passed 13 tests

"Boekuwzending for Woocommerce" version 2.2.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
35 characters long description:
Use the Boekuwzending Shipping Tool

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
There were no executable files found in this plugin611,750 lines of code in 1,630 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,5927,21022,836608,748
JSON300970
Markdown172260622
JavaScript71410618
PO File1144180457
Sass2410176
YAML2100110
XML21230
diff13716
CSS3003

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity14.11
▷ Minimum class complexity1.00
▷ Maximum class complexity366.00
Average method complexity2.88
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces45
Interfaces28
Traits11
Classes202
▷ Abstract classes83.96%
▷ Concrete classes19496.04%
▷ Final classes3920.10%
Methods1,533
▷ Static methods27317.81%
▷ Public methods1,34287.54%
▷ Protected methods895.81%
▷ Private methods1026.65%
Functions234
▷ Named functions12452.99%
▷ Anonymous functions11047.01%
Constants187
▷ Global constants105.35%
▷ Class constants17794.65%
▷ Public constants17096.05%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/img/icon.png3.01KB1.96KB▼ 34.75%
assets/admin/img/icon.png3.01KB1.96KB▼ 34.75%