78% inpost-for-woocommerce

Code Review | InPost PL

WordPress plugin InPost PL scored78%from 54 tests.

About plugin

  • Plugin page: inpost-for-woocom...
  • Plugin version: 1.2.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Nov 17, 2022
  • Latest release: Nov 28, 2023
  • Number of updates: 54
  • Update frequency: every 7.2 days
  • Top authors: inspirelabs (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

4,000+ active /33,652 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.49ms] Passed 4 tests

This is a short check of server-side resources used by InPost PL
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.55 ▲0.59
Dashboard /wp-admin3.37 ▲0.0645.72 ▼6.91
Posts /wp-admin/edit.php3.48 ▲0.1249.48 ▲3.51
Add New Post /wp-admin/post-new.php5.95 ▲0.0682.49 ▼8.58
Media Library /wp-admin/upload.php3.29 ▲0.0633.63 ▼3.06

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

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

Browser metrics Passed 4 tests

A check of browser resources used by InPost PL
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲2814.69 ▲0.361.78 ▲0.0743.26 ▼2.11
Dashboard /wp-admin2,198 ▲185.56 ▼0.0889.31 ▼14.7040.75 ▼5.58
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0739.96 ▼0.9935.86 ▲0.37
Add New Post /wp-admin/post-new.php1,526 ▼023.37 ▲0.40659.89 ▼46.2957.76 ▼0.97
Media Library /wp-admin/upload.php1,400 ▼04.24 ▲0.0194.70 ▼22.6542.65 ▼6.40

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/inpost-for-woocommerce/src/InspireLabs/WoocommerceInpost/shipping/views/html-order-metabox-courier.php
  • 49× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Filter\\FilterException' not found in wp-content/plugins/inpost-for-woocommerce/lib/FPDI/src/PdfParser/Filter/LzwException.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/inpost-for-woocommerce/lib/FPDI/src/PdfParser/Type/PdfString.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\FpdiException' not found in wp-content/plugins/inpost-for-woocommerce/lib/FPDI/src/PdfParser/PdfParserException.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/inpost-for-woocommerce/lib/FPDI/src/PdfParser/Type/PdfName.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function InspireLabs\\WoocommerceInpost\\shipping\\add_action() in wp-content/plugins/inpost-for-woocommerce/src/InspireLabs/WoocommerceInpost/shipping/Easypack_checkout_validator.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\Type\\PdfType' not found in wp-content/plugins/inpost-for-woocommerce/lib/FPDI/src/PdfParser/Type/PdfIndirectObject.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/inpost-for-woocommerce/resources/templates/checkout/easypack-review-order-after-shipping.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/inpost-for-woocommerce/src/InspireLabs/WoocommerceInpost/shipping/views/html-field-commercial-product-identifier.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'setasign\\Fpdi\\PdfParser\\CrossReference\\AbstractReader' not found in wp-content/plugins/inpost-for-woocommerce/lib/FPDI/src/PdfParser/CrossReference/LineReader.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'FPDF' not found in wp-content/plugins/inpost-for-woocommerce/lib/FPDI/src/FpdfTpl.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: etykiety, inpost, przesyki, paczkomaty

inpost-for-woocommerce/woocommerce-inpost.php 77% from 13 tests

The primary PHP file in "InPost PL" version 1.2.5 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: The description should be shorter than 140 characters (currently 174 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("inpost-for-woocommerce.php" instead of "woocommerce-inpost.php")

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
No dangerous file extensions were detected27,848 lines of code in 198 files:
LanguageFilesBlank linesComment linesLines of code
PHP1745,6696,11825,829
PO File1375624767
JavaScript1117023745
CSS68010329
Markdown2280108
JSON40070

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity26.11
▷ Minimum class complexity1.00
▷ Maximum class complexity339.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces23
Interfaces2
Traits2
Classes118
▷ Abstract classes32.54%
▷ Concrete classes11597.46%
▷ Final classes00.00%
Methods1,143
▷ Static methods17915.66%
▷ Public methods1,01889.06%
▷ Protected methods796.91%
▷ Private methods464.02%
Functions37
▷ Named functions2259.46%
▷ Anonymous functions1540.54%
Constants198
▷ Global constants31.52%
▷ Class constants19598.48%
▷ Public constants195100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/assets/images/logo/inpost-paczkomat-logo.png15.25KB6.58KB▼ 56.83%
resources/assets/images/logo/inpost-paczka-w-weekend.png2.40KB1.10KB▼ 54.21%
resources/assets/images/logo/small/black.png24.63KB6.61KB▼ 73.18%
resources/assets/images/logo/small/white.png14.51KB4.07KB▼ 71.99%
resources/assets/images/logo/small/yellow.png21.64KB6.34KB▼ 70.68%