83% woo-inpost

Code Review | InPost for WooCommerce

WordPress plugin InPost for WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: woo-inpost
  • Plugin version: 1.4.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 4, 2016
  • Latest release: Mar 24, 2023
  • Number of updates: 39
  • Update frequency: every 65.5 days
  • Top authors: inspirelabs (71.79%)wpdesk (30.77%)

Code review

54 tests

User reviews

17 reviews

Install metrics

4,000+ active /57,705 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼3.88ms] Passed 4 tests

A check of server-side resources used by InPost for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.11 ▲1.64
Dashboard /wp-admin3.40 ▲0.0950.39 ▼3.75
Posts /wp-admin/edit.php3.51 ▲0.1545.61 ▼7.48
Add New Post /wp-admin/post-new.php5.98 ▲0.09100.62 ▼3.21
Media Library /wp-admin/upload.php3.32 ▲0.0937.07 ▼1.06

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 146 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_recent-posts
woo_inpost_show_popup_once
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for InPost for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.55 ▼0.665.64 ▲3.9143.34 ▼3.90
Dashboard /wp-admin2,203 ▲125.83 ▲0.77109.51 ▲4.6843.40 ▼0.57
Posts /wp-admin/edit.php2,089 ▼31.97 ▼0.0236.71 ▼2.0638.53 ▲1.77
Add New Post /wp-admin/post-new.php1,523 ▲922.98 ▲5.32666.77 ▼8.6562.14 ▲4.76
Media Library /wp-admin/upload.php1,388 ▲64.23 ▲0.04106.10 ▲2.1142.32 ▼4.91

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
These items require your attention
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • woo_inpost_show_popup_once
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% 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
Almost there! Just fix the following items
  • 16× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-inpost/templates/checkout/crossborder-review-order-after-shipping.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-inpost/themes/Avada/woocommerce/checkout/easypack-review-order-after-shipping.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-inpost/classes/shipping/class-easypack-checkout-validator-service.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/woo-inpost/templates/myaccount/before-my-account.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'FPDF' not found in wp-content/plugins/woo-inpost/lib/code128.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'FPDF' not found in wp-content/plugins/woo-inpost/lib/fpdi/fpdi_bridge.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'TCPDF' not found in wp-content/plugins/woo-inpost/lib/fpdi/fpdi2tcpdf_bridge.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-inpost/templates/checkout/easypack-review-order-after-shipping.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woo-inpost/templates/emails/after-order-table.php:12
    • > PHP Notice
      Undefined variable: returns_page in wp-content/plugins/woo-inpost/templates/myaccount/after-my-account.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: Add images for these screenshots: #1 (Main settings.), #2 (Generate parcel.)
You can take inspiration from this readme.txt

woo-inpost/woo-inpost.php 85% from 13 tests

Analyzing the main PHP file in "InPost for WooCommerce" version 1.4.0
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 188 characters long)
  • Domain Path: The domain path folder was not found ("/lang/")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected15,307 lines of code in 84 files:
LanguageFilesBlank linesComment linesLines of code
PHP711,8432,05912,182
PO File51,1752,0362,814
JavaScript42510144
CSS2261133
JSON10030
INI1004

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity43.51
▷ Minimum class complexity1.00
▷ Maximum class complexity338.00
Average method complexity4.23
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes35
▷ Abstract classes12.86%
▷ Concrete classes3497.14%
▷ Final classes00.00%
Methods460
▷ Static methods459.78%
▷ Public methods38884.35%
▷ Protected methods7115.43%
▷ Private methods10.22%
Functions31
▷ Named functions3096.77%
▷ Anonymous functions13.23%
Constants23
▷ Global constants14.35%
▷ Class constants2295.65%
▷ Public constants22100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/logo/small/black.png24.63KB6.61KB▼ 73.18%
assets/images/logo/small/yellow.png21.64KB6.34KB▼ 70.68%
assets/images/logo/small/white.png14.51KB4.07KB▼ 71.99%