74% wc-ukr-shipping

Code Review | WC Nova Poshta Shipping - Integration of Nova Poshta delivery service for WooCommerce

WordPress plugin WC Nova Poshta Shipping - Integration of Nova Poshta delivery service for WooCommerce scored74%from 54 tests.

About plugin

  • Plugin page: wc-ukr-shipping
  • Plugin version: 1.12.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Jun 6, 2019
  • Latest release: Oct 19, 2023
  • Number of updates: 55
  • Update frequency: every 29.0 days
  • Top authors: kirillbdev (100%)

Code review

54 tests

User reviews

38 reviews

Install metrics

6,000+ active /56,303 total downloads

Benchmarks

Plugin footprint 65% 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 gracefully, with no errors

Server metrics [RAM: ▲0.52MB] [CPU: ▲2.95ms] Passed 4 tests

A check of server-side resources used by WC Nova Poshta Shipping - Integration of Nova Poshta delivery service for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.98 ▲0.5143.05 ▲3.35
Dashboard /wp-admin3.82 ▲0.5256.11 ▲7.50
Posts /wp-admin/edit.php3.94 ▲0.5852.52 ▼0.17
Add New Post /wp-admin/post-new.php6.42 ▲0.5490.66 ▲1.11
Media Library /wp-admin/upload.php3.74 ▲0.5248.60 ▲10.66

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 147 new files
Database: 3 new tables, 7 new options
New tables
wp_wc_ukr_shipping_np_cities
wp_wc_ukr_shipping_np_areas
wp_wc_ukr_shipping_np_warehouses
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded
widget_recent-posts
wcus_migrations_history
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WC Nova Poshta Shipping - Integration of Nova Poshta delivery service for WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲11713.57 ▼0.964.46 ▲2.7940.50 ▼5.86
Dashboard /wp-admin2,244 ▲706.09 ▲0.5196.84 ▲11.0869.14 ▲25.03
Posts /wp-admin/edit.php2,163 ▲632.36 ▲0.3540.41 ▲0.2732.88 ▼2.59
Add New Post /wp-admin/post-new.php1,740 ▲21423.13 ▼0.04746.76 ▲43.1340.83 ▼19.95
Media Library /wp-admin/upload.php1,461 ▲644.79 ▲0.5998.61 ▲2.1378.73 ▲33.87

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 3 tables
    • wp_wc_ukr_shipping_np_warehouses
    • wp_wc_ukr_shipping_np_areas
    • wp_wc_ukr_shipping_np_cities
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • wcus_migrations_history
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'kirillbdev\\WCUSCore\\DB\\QueryBuilder\\BaseWhereClause' not found in wp-content/plugins/wc-ukr-shipping/vendor/kirillbdev/wcus-core/src/DB/QueryBuilder/WhereClause.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wcus_i18n() in wp-content/plugins/wc-ukr-shipping/views/partial/settings_shipping.php:4
    • > PHP Fatal error
      Uncaught Error: Interface 'kirillbdev\\WCUSCore\\DB\\QueryBuilder\\ClauseInterface' not found in wp-content/plugins/wc-ukr-shipping/vendor/kirillbdev/wcus-core/src/DB/QueryBuilder/WhereRawClause.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'kirillbdev\\WCUkrShipping\\Contracts\ovaPoshtaAddressProviderInterface' not found in wp-content/plugins/wc-ukr-shipping/src/Api/CloudApi.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'kirillbdev\\WCUSCore\\DB\\QueryBuilder\\BaseWhereClause' not found in wp-content/plugins/wc-ukr-shipping/vendor/kirillbdev/wcus-core/src/DB/QueryBuilder/WhereInClause.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wcus_i18n() in wp-content/plugins/wc-ukr-shipping/views/partial/settings_general.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wcus_i18n() in wp-content/plugins/wc-ukr-shipping/views/partial/settings_translates.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser 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 describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: You can take inspiration from this readme.txt

wc-ukr-shipping/wc-ukr-shipping.php Passed 13 tests

The main PHP script in "WC Nova Poshta Shipping - Integration of Nova Poshta delivery service for WooCommerce" version 1.12.1 is automatically included on every request by WordPress
59 characters long description:
Integration of Nova Poshta delivery service 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 plugin5,898 lines of code in 140 files:
LanguageFilesBlank linesComment linesLines of code
PHP1271,2811,4815,246
PO File214612357
SVG404207
JSON10046
JavaScript47240
CSS2002

PHP code Passed 2 tests

An short overview of 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.33
Average class complexity3.99
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces45
Interfaces12
Traits1
Classes101
▷ Abstract classes65.94%
▷ Concrete classes9594.06%
▷ Final classes88.42%
Methods444
▷ Static methods378.33%
▷ Public methods39087.84%
▷ Protected methods40.90%
▷ Private methods5011.26%
Functions28
▷ Named functions621.43%
▷ Anonymous functions2278.57%
Constants22
▷ Global constants1359.09%
▷ Class constants940.91%
▷ Public constants9100.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
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
image/menu-icon.png0.49KB0.75KB0.00%