10% woo-shipping-for-nova-poshta

Code Review | Woo Shipping for Nova Poshta

WordPress plugin Woo Shipping for Nova Poshta scored10%from 54 tests.

About plugin

  • Plugin page: woo-shipping-for-...
  • Plugin version: 2.1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.9.1
  • WordPress version: 6.3.1
  • First release: Aug 14, 2016
  • Latest release: Jun 2, 2018
  • Number of updates: 24
  • Update frequency: every 27.5 days
  • Top authors: snezbritskiy (100%)

Code review

54 tests

User reviews

35 reviews

Install metrics

300+ active /14,435 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/woo-shipping-for-nova-poshta/classes/base/Options.php+126
    Trying to access array offset on value of type bool

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

This is a short check of server-side resources used by Woo Shipping for Nova Poshta
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.87 ▼4.46
Dashboard /wp-admin3.31 ▼0.0449.36 ▼10.64
Posts /wp-admin/edit.php3.36 ▲0.0047.22 ▲2.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.96 ▼7.00
Media Library /wp-admin/upload.php3.23 ▲0.0039.84 ▲5.38

Server storage [IO: ▲0.98MB] [DB: ▲9.41MB] Passed 3 tests

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 253 new files
Database: 3 new tables, 7 new options
New tables
wp_nova_poshta_warehouse
wp_nova_poshta_region
wp_nova_poshta_city
New WordPress options
can_compress_scripts
widget_recent-posts
_nova_poshta_locations_last_update_date
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Woo Shipping for Nova Poshta
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.74 ▲0.361.74 ▼0.0142.18 ▼1.99
Dashboard /wp-admin2,206 ▲154.89 ▼0.99109.16 ▼0.7639.12 ▼8.48
Posts /wp-admin/edit.php2,089 ▲182.02 ▼0.0335.87 ▲1.2434.18 ▲0.34
Add New Post /wp-admin/post-new.php1,514 ▼2817.69 ▼0.80697.53 ▲98.1157.94 ▲6.97
Media Library /wp-admin/upload.php1,385 ▲34.25 ▲0.02103.15 ▲3.9546.56 ▲5.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please fix the following items
  • 175× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'plugins\ovaPoshta\\classes\\base\\Base' not found in wp-content/plugins/woo-shipping-for-nova-poshta/classes/repository/AreaRepositoryFactory.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/woo-shipping-for-nova-poshta/vendor/monolog/monolog/tests/Monolog/Handler/SamplingHandlerTest.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/woo-shipping-for-nova-poshta/vendor/monolog/monolog/tests/Monolog/Handler/NativeMailerHandlerTest.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/woo-shipping-for-nova-poshta/vendor/monolog/monolog/tests/Monolog/Handler/BufferHandlerTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'plugins\ovaPoshta\\classes\\repository\\AbstractAreaRepository' not found in wp-content/plugins/woo-shipping-for-nova-poshta/classes/repository/CityRepository.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'plugins\ovaPoshta\\classes\\base\\Base' not found in wp-content/plugins/woo-shipping-for-nova-poshta/classes/base/DatabaseSync.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/woo-shipping-for-nova-poshta/vendor/monolog/monolog/tests/Monolog/Processor/WebProcessorTest.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/woo-shipping-for-nova-poshta/vendor/monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\TestCase' not found in wp-content/plugins/woo-shipping-for-nova-poshta/vendor/monolog/monolog/tests/Monolog/Handler/FleepHookHandlerTest.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/woo-shipping-for-nova-poshta/vendor/monolog/monolog/src/Monolog/Handler/GelfHandler.php:27

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can look at the official readme.txt

woo-shipping-for-nova-poshta/woo-shipping-for-nova-poshta.php Passed 13 tests

The main file in "Woo Shipping for Nova Poshta" v. 2.1.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
79 characters long description:
Plugin for administrating Nova Poshta shipping method within Woocommerce Plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin18,726 lines of code in 238 files:
LanguageFilesBlank linesComment linesLines of code
PHP2133,5447,96415,959
JavaScript6217541,225
Markdown92450997
JSON500323
PO File26268200
XML13016
CSS2006

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity6.01
▷ Minimum class complexity1.00
▷ Maximum class complexity80.00
Average method complexity1.82
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces17
Interfaces5
Traits2
Classes213
▷ Abstract classes104.69%
▷ Concrete classes20395.31%
▷ Final classes00.00%
Methods1,385
▷ Static methods705.05%
▷ Public methods1,05776.32%
▷ Protected methods21915.81%
▷ Private methods1097.87%
Functions76
▷ Named functions1013.16%
▷ Anonymous functions6686.84%
Constants87
▷ Global constants66.90%
▷ Class constants8193.10%
▷ Public constants81100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected