68% woo-dp-internetmarke

Code Review | WooCommerce Deutsche Post Internetmarke

WordPress plugin WooCommerce Deutsche Post Internetmarke scored68%from 54 tests.

About plugin

  • Plugin page: woo-dp-internetmarke
  • Plugin version: 3.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.2
  • WordPress version: 6.3.1
  • First release: Mar 26, 2018
  • Latest release: Apr 18, 2023
  • Number of updates: 55
  • Update frequency: every 33.7 days
  • Top authors: stinaglobal (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

300+ active /11,221 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.06ms] Passed 4 tests

Analyzing server-side resources used by WooCommerce Deutsche Post Internetmarke
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0341.82 ▼2.42
Dashboard /wp-admin3.34 ▲0.0347.16 ▼6.49
Posts /wp-admin/edit.php3.39 ▲0.0351.16 ▼0.71
Add New Post /wp-admin/post-new.php5.92 ▲0.0391.46 ▼10.63
Media Library /wp-admin/upload.php3.26 ▲0.0237.35 ▲0.06

Server storage [IO: ▲5.77MB] [DB: ▲0.01MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 638 new files
Database: 7 new tables, 7 new options
New tables
wp_wcdpi_shipment_item
wp_wcdpi_product_additional
wp_wcdpi_product_sales
wp_wcdpi_product_basic
wp_wcdpi_shipment
wp_wcdpi_shipment_attachment
wp_wcdpi_page_format
New WordPress options
widget_recent-posts
internetmarke_db_version
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for WooCommerce Deutsche Post Internetmarke
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.60 ▼1.011.75 ▼0.1342.21 ▼3.73
Dashboard /wp-admin2,206 ▲214.83 ▼1.07109.25 ▲6.6443.57 ▲2.44
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0239.38 ▼1.0234.43 ▼2.71
Add New Post /wp-admin/post-new.php1,542 ▲1418.03 ▲0.06630.73 ▼23.2662.21 ▲8.81
Media Library /wp-admin/upload.php1,391 ▲94.26 ▲0.02101.16 ▼4.1541.45 ▼4.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 tables in the database
    • wp_wcdpi_product_additional
    • wp_wcdpi_page_format
    • wp_wcdpi_shipment
    • wp_wcdpi_product_basic
    • wp_wcdpi_shipment_attachment
    • wp_wcdpi_shipment_item
    • wp_wcdpi_product_sales
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% 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 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
Please fix the following items
  • 8× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-dp-internetmarke/vendor/setasign/fpdf/tutorial/tuto2.php
    • > /wp-content/plugins/woo-dp-internetmarke/vendor/setasign/fpdf/tutorial/tuto7.php
    • > /wp-content/plugins/woo-dp-internetmarke/vendor/setasign/fpdf/tutorial/tuto4.php
    • > /wp-content/plugins/woo-dp-internetmarke/vendor/setasign/fpdf/tutorial/tuto6.php
    • > /wp-content/plugins/woo-dp-internetmarke/vendor/setasign/fpdf/tutorial/tuto1.php
    • > /wp-content/plugins/woo-dp-internetmarke/vendor/setasign/fpdf/tutorial/makefont.php
    • > /wp-content/plugins/woo-dp-internetmarke/vendor/setasign/fpdf/tutorial/tuto3.php
    • > /wp-content/plugins/woo-dp-internetmarke/vendor/setasign/fpdf/tutorial/tuto5.php
  • 201× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'DeutschePost\\Internetmarke\\Connectors\\Abstracts\\cURL\\Request' not found in wp-content/plugins/woo-dp-internetmarke/includes/Connectors/ForkLane/Request/UpdateProductList.php:10
    • > PHP Notice
      Undefined variable: migrationMode in wp-content/plugins/woo-dp-internetmarke/migrations/20190409123000_207_update_features.php on line 3
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/woo-dp-internetmarke/vendor/setasign/fpdf/makefont/ttfparser.php on line 382
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/woo-dp-internetmarke/vendor/setasign/fpdi/src/PdfParser/Type/PdfBoolean.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\\JsonFormatter' not found in wp-content/plugins/woo-dp-internetmarke/vendor/monolog/monolog/src/Monolog/Formatter/LogglyFormatter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/woo-dp-internetmarke/vendor/wsdltophp/wssecurity/tests/TestCase.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'DeutschePost\\Internetmarke\\Connectors\\Abstracts\\SOAP\\Response' not found in wp-content/plugins/woo-dp-internetmarke/includes/Connectors/ProdWS/Response/RegisterNotification.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/woo-dp-internetmarke/vendor/psr/log/Psr/Log/AbstractLogger.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'DeutschePost\\Internetmarke\\Connectors\\Abstracts\\SOAP\\Request' not found in wp-content/plugins/woo-dp-internetmarke/includes/Connectors/ProdWS/Request/GetProductChangeInformation.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/woo-dp-internetmarke/vendor/monolog/monolog/src/Monolog/Processor/MercurialProcessor.php:21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Tags: There are too many tags (14 tag instead of maximum 10)
  • Screenshots: Screenshot #1 (New shipment wizard.) image not found
You can take inspiration from this readme.txt

woo-dp-internetmarke/woo-dp-internetmarke.php Passed 13 tests

The main file in "WooCommerce Deutsche Post Internetmarke" v. 3.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
82 characters long description:
WordPress and WooCommerce integration for the Deutsche Post Internetmarke service.

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
Success! There were no dangerous files found in this plugin43,624 lines of code in 550 files:
LanguageFilesBlank linesComment linesLines of code
PHP4448,45514,97236,325
HTML597203,240
JavaScript14153661,525
CSS11126371,187
Markdown91950674
JSON810615
YAML36026
XML12025
Dockerfile1307

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.91
▷ Minimum class complexity1.00
▷ Maximum class complexity337.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces58
Interfaces21
Traits6
Classes351
▷ Abstract classes349.69%
▷ Concrete classes31790.31%
▷ Final classes20.63%
Methods2,445
▷ Static methods1084.42%
▷ Public methods1,97080.57%
▷ Protected methods38015.54%
▷ Private methods953.89%
Functions70
▷ Named functions4665.71%
▷ Anonymous functions2434.29%
Constants198
▷ Global constants199.60%
▷ Class constants17990.40%
▷ Public constants179100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
32 compressed PNG files occupy 0.81MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/packet_plus_previews/13145.png17.71KB19.12KB0.00%
assets/images/packet_plus_previews/13160.png22.02KB23.23KB0.00%
assets/images/packet_plus_previews/13135.png46.25KB49.88KB0.00%
assets/images/packet_plus_previews/13137.png47.91KB51.48KB0.00%
assets/images/packet_plus_previews/13170.png8.96KB9.35KB0.00%