84% croatian-shipping-for-woocommerce

Code Review | Croatian Shipping for WooCommerce

WordPress plugin Croatian Shipping for WooCommerce scored84%from 54 tests.

About plugin

  • Plugin page: croatian-shipping...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Nov 26, 2015
  • Latest release: Jul 3, 2016
  • Number of updates: 10
  • Update frequency: every 22.0 days
  • Top authors: ibenic (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,247 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Croatian Shipping for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.49 ▼2.33
Dashboard /wp-admin3.31 ▲0.0049.39 ▼0.62
Posts /wp-admin/edit.php3.36 ▲0.0044.72 ▼5.65
Add New Post /wp-admin/post-new.php5.89 ▲0.0095.16 ▲0.57
Media Library /wp-admin/upload.php3.23 ▲0.0038.72 ▲0.24

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Croatian Shipping for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.57 ▼0.991.66 ▼1.2244.87 ▲2.25
Dashboard /wp-admin2,206 ▲184.81 ▼0.10109.51 ▲4.9042.23 ▼2.52
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0535.34 ▼5.8737.15 ▼0.87
Add New Post /wp-admin/post-new.php1,520 ▲622.93 ▲5.38681.96 ▲25.9459.78 ▲5.85
Media Library /wp-admin/upload.php1,382 ▼34.18 ▼0.0497.74 ▼0.8941.41 ▲0.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

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)
Good news, no errors were detected

SRP 50% 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 fix the following
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/croatian-shipping-for-woocommerce/shippings/ibenic_woo_hp_shipping.php:767
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/croatian-shipping-for-woocommerce/croatian_shipping_for_woocommerce.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/croatian-shipping-for-woocommerce/shippings/ibenic_woo_tisak_shipping.php:197

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: woocommerce, croatian shipping

croatian-shipping-for-woocommerce/croatian_shipping_for_woocommerce.php 92% from 13 tests

"Croatian Shipping for WooCommerce" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("croatian-shipping-for-woocommerce.php" instead of "croatian_shipping_for_woocommerce.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,305 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP52512041,161
PO File24850144

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
The following items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 168)
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity108.50
▷ Minimum class complexity18.00
▷ Maximum class complexity199.00
Average method complexity16.36
▷ Minimum method complexity1.00
▷ Maximum method complexity168.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods1392.86%
▷ Protected methods17.14%
▷ Private methods00.00%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin