78% bliskapaczka-pl

Code Review | Bliskapaczka.pl: integracja z WooCommerce

WordPress plugin Bliskapaczka.pl: integracja z WooCommerce scored78%from 54 tests.

About plugin

  • Plugin page: bliskapaczka-pl
  • Plugin version: 1.5.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5.1
  • WordPress version: 6.3.1
  • First release: Jul 8, 2020
  • Latest release: Aug 4, 2021
  • Number of updates: 24
  • Update frequency: every 16.5 days
  • Top authors: senditsa (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

40+ active /2,131 total downloads

Benchmarks

Plugin footprint 83% 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.12MB] [CPU: ▼7.00ms] Passed 4 tests

An overview of server-side resources used by Bliskapaczka.pl: integracja z WooCommerce
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1342.46 ▼2.35
Dashboard /wp-admin3.44 ▲0.0952.55 ▼16.47
Posts /wp-admin/edit.php3.55 ▲0.2051.58 ▲0.11
Add New Post /wp-admin/post-new.php6.02 ▲0.1399.22 ▼6.09
Media Library /wp-admin/upload.php3.36 ▲0.1336.47 ▼3.09

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 237 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Bliskapaczka.pl: integracja z WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲6814.24 ▲0.261.89 ▲0.1541.74 ▼1.91
Dashboard /wp-admin2,198 ▲185.62 ▼0.0591.35 ▼5.9239.53 ▼7.49
Posts /wp-admin/edit.php2,100 ▼02.02 ▲0.0141.06 ▲0.0835.58 ▼3.78
Add New Post /wp-admin/post-new.php1,526 ▼023.14 ▼0.07647.40 ▼36.0558.74 ▼4.48
Media Library /wp-admin/upload.php1,400 ▼04.18 ▲0.0497.53 ▼17.5044.49 ▼3.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 6× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/bliskapaczka-pl/vendor/globalcitizen/php-iban/utils/convert-registry.php
    • > /wp-content/plugins/bliskapaczka-pl/vendor/globalcitizen/php-iban/utils/ootest.php
    • > /wp-content/plugins/bliskapaczka-pl/vendor/globalcitizen/php-iban/utils/other-tests.php
    • > /wp-content/plugins/bliskapaczka-pl/vendor/globalcitizen/php-iban/utils/dump.php
    • > /wp-content/plugins/bliskapaczka-pl/vendor/globalcitizen/php-iban/utils/validate-list.php
    • > /wp-content/plugins/bliskapaczka-pl/vendor/globalcitizen/php-iban/utils/test.php
  • 80× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/bliskapaczka-pl/vendor/bliskapaczkapl/bliskapaczka-api-client/tests/unit/Bliskapaczka/ApiClient/Bliskapaczka/Todoor/AdviceTest.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Bliskapaczka\\ApiClient\\ShopVersion\\ShopVersionInterface' not found in wp-content/plugins/bliskapaczka-pl/vendor/bliskapaczkapl/bliskapaczka-api-client/src/Bliskapaczka/ApiClient/ShopVersion/Woocommerce.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/bliskapaczka-pl/vendor/bliskapaczkapl/bliskapaczka-api-client/tests/unit/Bliskapaczka/ApiClient/Bliskapaczka/ReportTest.php:8
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/bliskapaczka-pl/vendor/bliskapaczkapl/bliskapaczka-api-client/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/bliskapaczka-pl/vendor/bliskapaczkapl/bliskapaczka-api-client/index.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Bliskapaczka\\ApiClient\\Bliskapaczka\\Order' not found in wp-content/plugins/bliskapaczka-pl/vendor/bliskapaczkapl/bliskapaczka-api-client/src/Bliskapaczka/ApiClient/Bliskapaczka/Todoor.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/bliskapaczka-pl/vendor/bliskapaczkapl/bliskapaczka-api-client/tests/intergation/Bliskapaczka/ApiClinet/OrderValidationTest.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Bliskapaczka\\ApiClient\\ShopVersion\\ShopVersionInterface' not found in wp-content/plugins/bliskapaczka-pl/vendor/bliskapaczkapl/bliskapaczka-api-client/src/Bliskapaczka/ApiClient/ShopVersion/Magento1.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/bliskapaczka-pl/vendor/bliskapaczkapl/bliskapaczka-api-client/tests/unit/Bliskapaczka/ApiClient/Bliskapaczka/Order/WaybillTest.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/bliskapaczka-pl/vendor/bliskapaczkapl/bliskapaczka-api-client/tests/unit/Bliskapaczka/ApiClient/Validator/Order/AdviceTest.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/bliskapaczka-pl/vendor/bliskapaczkapl/bliskapaczka-api-client/tests/pact/Bliskapaczka/ApiClient/Bliskapaczka/Pos/GetTest.php:7

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: mapa, bliskapaczka, sendit, paczkomaty, dostawa...

bliskapaczka-pl/class-bliskapaczka-shipping-method.php 92% from 13 tests

The primary PHP file in "Bliskapaczka.pl: integracja z WooCommerce" version 1.5.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("bliskapaczka-pl.php" instead of "class-bliskapaczka-shipping-method.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin11,804 lines of code in 143 files:
LanguageFilesBlank linesComment linesLines of code
PHP1232,1893,4269,738
Markdown634401,273
JSON410199
PO File15,05212,261199
JavaScript35632198
CSS2135108
YAML25043
Bourne Again Shell14825
Dockerfile16721

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.84
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity1.70
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces24
Interfaces5
Traits2
Classes100
▷ Abstract classes55.00%
▷ Concrete classes9595.00%
▷ Final classes00.00%
Methods583
▷ Static methods427.20%
▷ Public methods46579.76%
▷ Protected methods10017.15%
▷ Private methods183.09%
Functions127
▷ Named functions12296.06%
▷ Anonymous functions53.94%
Constants65
▷ Global constants23.08%
▷ Class constants6396.92%
▷ Public constants63100.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
9 PNG files occupy 0.17MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/operators/XPRESS.png13.33KB4.85KB▼ 63.60%
assets/img/operators/INPOST.png9.64KB4.54KB▼ 52.89%
assets/img/operators/POCZTA.png15.07KB6.39KB▼ 57.57%
assets/img/operators/DHL.png44.73KB17.19KB▼ 61.57%
assets/img/operators/DPD.png29.37KB12.60KB▼ 57.08%