83% paps-shipping-for-woocommerce

Code Review | Paps shipping for WooCommerce plugin

WordPress plugin Paps shipping for WooCommerce plugin scored83%from 54 tests.

About plugin

  • Plugin page: paps-shipping-for...
  • Plugin version: 3.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.0
  • WordPress version: 6.3.1
  • First release: Jan 18, 2019
  • Latest release: Nov 21, 2022
  • Number of updates: 80
  • Update frequency: every 17.6 days
  • Top authors: kiamet (57.5%)madiodio (38.75%)deployer (6.25%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /3,682 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.32MB] [CPU: ▲0.20ms] Passed 4 tests

A check of server-side resources used by Paps shipping for WooCommerce plugin
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3637.43 ▼2.66
Dashboard /wp-admin3.66 ▲0.3649.49 ▲0.36
Posts /wp-admin/edit.php3.71 ▲0.3551.31 ▲4.63
Add New Post /wp-admin/post-new.php6.18 ▲0.2984.26 ▼1.52
Media Library /wp-admin/upload.php3.52 ▲0.2936.62 ▲4.79

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Paps shipping for WooCommerce plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.54 ▼0.831.66 ▼0.2640.08 ▼5.53
Dashboard /wp-admin2,203 ▲154.89 ▼0.01107.13 ▼1.5938.38 ▼6.15
Posts /wp-admin/edit.php2,092 ▲31.97 ▼0.1835.57 ▼5.4332.04 ▼5.10
Add New Post /wp-admin/post-new.php1,514 ▼2117.71 ▼5.31687.37 ▲29.7665.28 ▲16.36
Media Library /wp-admin/upload.php1,391 ▲34.17 ▼0.0395.01 ▼4.1343.08 ▲1.61

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

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 139× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/paps-shipping-for-woocommerce/vendor/guzzlehttp/streams/tests/CachingStreamTest.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Stream\\StreamInterface' not found in wp-content/plugins/paps-shipping-for-woocommerce/vendor/guzzlehttp/streams/src/NoSeekStream.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Stream\\StreamInterface' not found in wp-content/plugins/paps-shipping-for-woocommerce/vendor/guzzlehttp/streams/src/FnStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/paps-shipping-for-woocommerce/vendor/guzzlehttp/streams/tests/LazyOpenStreamTest.php:6
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Message\\MessageInterface' not found in wp-content/plugins/paps-shipping-for-woocommerce/vendor/guzzlehttp/guzzle/src/Message/ResponseInterface.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\ToArrayInterface' not found in wp-content/plugins/paps-shipping-for-woocommerce/vendor/guzzlehttp/guzzle/src/Collection.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Ring\\Future\\FutureInterface' not found in wp-content/plugins/paps-shipping-for-woocommerce/vendor/guzzlehttp/ringphp/src/Future/FutureArrayInterface.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Message\\MessageFactoryInterface' not found in wp-content/plugins/paps-shipping-for-woocommerce/vendor/guzzlehttp/guzzle/src/Message/MessageFactory.php:21
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/paps-shipping-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/TransferException.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'React\\Promise\\PromiseInterface' not found in wp-content/plugins/paps-shipping-for-woocommerce/vendor/react/promise/src/CancellablePromiseInterface.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #4 (Settings.), #5 (Settings.)
The official readme.txt might help

paps-shipping-for-woocommerce/paps-shipping-for-woocommerce.php Passed 13 tests

"Paps shipping for WooCommerce plugin" version 3.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
61 characters long description:
Paps Shipping & Delivery Tracking Integration for WooCommerce

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin26,904 lines of code in 295 files:
LanguageFilesBlank linesComment linesLines of code
PHP2473,8389,17321,119
Markdown141,34304,085
JSON1200673
reStructuredText9263333517
make4455181
JavaScript11860163
YAML4222100
XML30047
Python14019

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity9.85
▷ Minimum class complexity1.00
▷ Maximum class complexity89.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity43.00
Code structure
Namespaces29
Interfaces35
Traits8
Classes190
▷ Abstract classes52.63%
▷ Concrete classes18597.37%
▷ Final classes115.95%
Methods1,733
▷ Static methods1639.41%
▷ Public methods1,51487.36%
▷ Protected methods191.10%
▷ Private methods20011.54%
Functions288
▷ Named functions6723.26%
▷ Anonymous functions22176.74%
Constants69
▷ Global constants00.00%
▷ Class constants69100.00%
▷ Public constants69100.00%

Plugin size 0% from 2 tests

Image compression 0% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.64MB with 0.40MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-5.png27.39KB13.71KB▼ 49.96%
assets/screenshot-4.png34.41KB18.05KB▼ 47.56%
assets/screenshot-3.png60.64KB22.99KB▼ 62.08%
assets/screenshot-2.png25.84KB12.87KB▼ 50.20%
(invalid) assets/banner-1544x500.png334.80KB0.00KB▼ 100.00%