10% woo-picup-shipping

Code Review | Picup Shipping for WooCommerce

WordPress plugin Picup Shipping for WooCommerce scored10%from 54 tests.

About plugin

  • Plugin page: woo-picup-shipping
  • Plugin version: 3.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Nov 26, 2019
  • Latest release: Jun 24, 2021
  • Number of updates: 31
  • Update frequency: every 18.6 days
  • Top authors: picupshipping (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,367 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Error in wp-content/plugins/woo-picup-shipping/src/Adapters/WoocommerceAdapter.php+56
    Uncaught Error: Call to undefined function wc_add_notice() in wp-content/plugins/woo-picup-shipping/src/Adapters/WoocommerceAdapter.php:56
    Stack trace:
    #0 wp-content/plugins/woo-picup-shipping/src/WooPicupShipping.php(109): PicupTechnologies\WooPicupShipping\Adapters\WoocommerceAdapter->addNotice()
    #1 wp-content/plugins/woo-picup-shipping/woo-picup-shipping.php(18): PicupTechnologies\WooPicupShipping\WooPicupShipping->__construct()
    #2 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #3 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▲0.00MB] [CPU: ▲0.19ms] Passed 4 tests

Analyzing server-side resources used by Picup Shipping for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.15 ▼2.60
Dashboard /wp-admin3.31 ▲0.0046.14 ▲1.85
Posts /wp-admin/edit.php3.36 ▲0.0048.12 ▲4.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.47 ▼1.95
Media Library /wp-admin/upload.php3.23 ▲0.0034.48 ▲3.47

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Picup Shipping for WooCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.64 ▼0.731.80 ▼0.3343.29 ▼0.99
Dashboard /wp-admin2,206 ▲305.84 ▼0.15102.84 ▼9.3636.11 ▼11.82
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0040.75 ▲3.5235.16 ▲0.47
Add New Post /wp-admin/post-new.php1,539 ▲2523.05 ▲5.49628.17 ▼38.2251.79 ▼0.08
Media Library /wp-admin/upload.php1,391 ▲34.21 ▼0.0196.86 ▼8.0640.46 ▼3.00

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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/woo-picup-shipping/templates/generic-management.php
    • > /wp-content/plugins/woo-picup-shipping/templates/shift-management.php
  • 132× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Money\\Exchange' not found in wp-content/plugins/woo-picup-shipping/vendor/moneyphp/money/src/Exchange/IndirectExchange.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PicupTechnologies\\WooPicupShipping\\Adapters\\apply_filters() in wp-content/plugins/woo-picup-shipping/src/Adapters/WoocommerceAdapter.php:23
    • > PHP Fatal error
      require(): Failed opening required 'wp-content/plugins/woo-picup-shipping/vendor/moneyphp/money/resources/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/woo-picup-shipping/vendor/moneyphp/money/resources/generate-money-factory.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/woo-picup-shipping/vendor/guzzlehttp/psr7/src/LimitStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/woo-picup-shipping/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'SebastianBergmann\\Comparator\\Comparator' not found in wp-content/plugins/woo-picup-shipping/vendor/moneyphp/money/src/PHPUnit/Comparator.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/woo-picup-shipping/vendor/guzzlehttp/promises/src/AggregateException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'PicupTechnologies\\PicupPHPApi\\Contracts\\PicupRequestInterface' not found in wp-content/plugins/woo-picup-shipping/vendor/picup/picup-php-api/src/Requests/ThirdPartyCollectionRequest.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/woo-picup-shipping/src/ShippingMethods/PicupGenericOrder.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/woo-picup-shipping/vendor/picup/picup-php-api/tests/Objects/DeliverySenderContactTest.php:10

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, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: shipping

woo-picup-shipping/woo-picup-shipping.php 92% from 13 tests

The main file in "Picup Shipping for WooCommerce" v. 3.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.1" instead of "3.0.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin25,228 lines of code in 320 files:
LanguageFilesBlank linesComment linesLines of code
PHP2854,77710,28819,734
Markdown131,22603,601
JSON12001,682
XML40895
YAML311086
CSS12011
Dockerfile18010
make1409

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity7.21
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity2.02
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces48
Interfaces26
Traits3
Classes234
▷ Abstract classes31.28%
▷ Concrete classes23198.72%
▷ Final classes12955.84%
Methods1,611
▷ Static methods1308.07%
▷ Public methods1,45290.13%
▷ Protected methods70.43%
▷ Private methods1529.44%
Functions152
▷ Named functions5737.50%
▷ Anonymous functions9562.50%
Constants70
▷ Global constants00.00%
▷ Class constants70100.00%
▷ Public constants70100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin