84% packlink-pro-shipping

Code Review | Packlink PRO shipping module

WordPress plugin Packlink PRO shipping module scored84%from 54 tests.

About plugin

  • Plugin page: packlink-pro-ship...
  • Plugin version: 3.3.4
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-6.3.2
  • WordPress version: 6.3.1
  • First release: Aug 16, 2016
  • Latest release: Nov 22, 2023
  • Number of updates: 95
  • Update frequency: every 28.0 days
  • Top authors: packlink (100%)

Code review

54 tests

User reviews

249 reviews

Install metrics

10,000+ active /216,671 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by Packlink PRO shipping module
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.41 ▼4.34
Dashboard /wp-admin3.31 ▼0.0449.81 ▼18.64
Posts /wp-admin/edit.php3.36 ▲0.0049.49 ▲1.69
Add New Post /wp-admin/post-new.php5.89 ▲0.0093.54 ▲0.02
Media Library /wp-admin/upload.php3.23 ▲0.0034.23 ▼0.31

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 802 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
PACKLINK_VERSION
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Packlink PRO shipping module
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,790 ▲4314.36 ▲0.051.57 ▼0.2938.43 ▼5.66
Dashboard /wp-admin2,198 ▲215.62 ▼0.0293.24 ▼3.7542.40 ▼1.62
Posts /wp-admin/edit.php2,100 ▼01.95 ▲0.0138.83 ▲2.2537.41 ▲1.17
Add New Post /wp-admin/post-new.php1,535 ▲925.01 ▲1.78611.65 ▼13.6867.63 ▲18.48
Media Library /wp-admin/upload.php1,397 ▼64.23 ▲0.0295.28 ▼10.0841.66 ▼6.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • PACKLINK_VERSION
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 207× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/packlink-pro-shipping/vendor/packlink/integration-core/vendor/leafo/scssphp/scss.inc.php' (include_path='.:/usr/share/php') in wp-content/plugins/packlink-pro-shipping/vendor/packlink/integration-core/cssCompile.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Logeecom\\Infrastructure\\Data\\DataTransferObject' not found in wp-content/plugins/packlink-pro-shipping/vendor/packlink/integration-core/src/BusinessLogic/Http/DTO/Draft/AdditionalData.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Packlink\\WooCommerce\\Components\\Utility\\Database' not found in wp-content/plugins/packlink-pro-shipping/upgrade/upgrade-2.2.0.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'Logeecom\\Infrastructure\\Http\\HttpClient' not found in wp-content/plugins/packlink-pro-shipping/vendor/packlink/integration-core/src/Infrastructure/Http/CurlHttpClient.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_url() in wp-content/plugins/packlink-pro-shipping/resources/views/success-message.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Logeecom\\Infrastructure\\Http\\Exceptions\\HttpBaseException' not found in wp-content/plugins/packlink-pro-shipping/vendor/packlink/integration-core/src/Infrastructure/Http/Exceptions/HttpBatchSizeTooBigException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Packlink\\BusinessLogic\\DTO\\FrontDto' not found in wp-content/plugins/packlink-pro-shipping/vendor/packlink/integration-core/src/BusinessLogic/Registration/RegistrationLegalPolicy.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Logeecom\\Infrastructure\\Data\\DataTransferObject' not found in wp-content/plugins/packlink-pro-shipping/vendor/packlink/integration-core/src/BusinessLogic/Http/DTO/Package.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Packlink\\BusinessLogic\\Country\\CountryService' not found in wp-content/plugins/packlink-pro-shipping/vendor/packlink/integration-core/src/BusinessLogic/Country/WarehouseCountryService.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Logeecom\\Infrastructure\\Utility\\Events\\Event' not found in wp-content/plugins/packlink-pro-shipping/vendor/packlink/integration-core/src/Infrastructure/TaskExecution/Events/QueueStatusChangedEvent.php:13

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)
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
4 plugin tags: shipping, woocommerce, packlink, shipment

packlink-pro-shipping/packlink-pro-shipping.php 92% from 13 tests

The main PHP script in "Packlink PRO shipping module" version 3.3.4 is automatically included on every request by WordPress
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "3.0.0")

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
Success! There were no dangerous files found in this plugin46,293 lines of code in 533 files:
LanguageFilesBlank linesComment linesLines of code
PHP3715,17417,50824,344
PO File173,0263,3167,046
JSON36003,859
JavaScript398431,4643,753
CSS10351133,262
HTML265251,666
Sass7287121,357
Markdown81540588
SVG15013319
YAML11060
XML10020
Bourne Shell211019

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.17
▷ Minimum class complexity1.00
▷ Maximum class complexity338.00
Average method complexity2.28
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces98
Interfaces18
Traits0
Classes306
▷ Abstract classes144.58%
▷ Concrete classes29295.42%
▷ Final classes00.00%
Methods1,871
▷ Static methods22612.08%
▷ Public methods1,36973.17%
▷ Protected methods31716.94%
▷ Private methods1859.89%
Functions107
▷ Named functions3532.71%
▷ Anonymous functions7267.29%
Constants252
▷ Global constants51.98%
▷ Class constants24798.02%
▷ Public constants247100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
113 PNG files occupy 0.43MB with 0.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
resources/images/carriers/chronopost.png2.49KB1.70KB▼ 31.65%
resources/images/carriers/brt.png4.13KB2.57KB▼ 37.90%
vendor/packlink/integration-core/src/BusinessLogic/Resources/images/carriers/ups.png1.94KB1.65KB▼ 15.02%
resources/packlink/images/carriers/dpd-pt.png2.15KB0.63KB▼ 70.47%
resources/packlink/images/carriers/sda.png5.93KB3.22KB▼ 45.62%