78% woo-cdek

Code Review | Woocommerce Shipping Details

WordPress plugin Woocommerce Shipping Details scored78%from 54 tests.

About plugin

  • Plugin page: woo-cdek
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.6
  • WordPress version: 6.3.1
  • First release: Feb 19, 2018
  • Latest release: Jan 26, 2021
  • Number of updates: 11
  • Update frequency: every 97.5 days
  • Top authors: webtemyk (72.73%)casepress (36.36%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /8,439 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.68MB] [CPU: ▼1.22ms] Passed 4 tests

Analyzing server-side resources used by Woocommerce Shipping Details
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.15 ▲0.6943.91 ▲3.09
Dashboard /wp-admin3.99 ▲0.6550.28 ▼9.02
Posts /wp-admin/edit.php4.10 ▲0.7546.03 ▲1.27
Add New Post /wp-admin/post-new.php6.59 ▲0.7085.25 ▼0.22
Media Library /wp-admin/upload.php3.91 ▲0.6938.11 ▲4.65

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 628 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Woocommerce Shipping Details
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8514.33 ▼0.261.82 ▲0.0845.04 ▼2.50
Dashboard /wp-admin2,212 ▲375.69 ▲0.0285.74 ▼22.8940.80 ▼0.99
Posts /wp-admin/edit.php2,117 ▲172.02 ▲0.0434.55 ▼1.9133.48 ▼0.13
Add New Post /wp-admin/post-new.php1,543 ▲1523.31 ▲0.16680.39 ▲30.7468.81 ▼3.68
Media Library /wp-admin/upload.php1,417 ▲174.13 ▼0.0598.27 ▼1.4946.10 ▲2.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% 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 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/woo-cdek/components/cdek-delivery/includes/Cdek/scripts/template.php
  • 94× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'DVDoug\\BoxPacker\\Box' not found in wp-content/plugins/woo-cdek/components/zaberi-tovar-delivery/vendor/dvdoug/boxpacker/tests/Test/TestBox.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/woo-cdek/components/zaberi-tovar-delivery/vendor/dvdoug/boxpacker/tests/PackedBoxTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/woo-cdek/components/zaberi-tovar-delivery/vendor/dvdoug/boxpacker/tests/PackedItemTest.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerAwareInterface' not found in wp-content/plugins/woo-cdek/components/cdek-delivery/vendor/dvdoug/boxpacker/src/LayerStabiliser.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerAwareInterface' not found in wp-content/plugins/woo-cdek/components/zaberi-tovar-delivery/vendor/dvdoug/boxpacker/src/VolumePacker.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/woo-cdek/components/zaberi-tovar-delivery/vendor/dvdoug/boxpacker/tests/WeightRedistributorTest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Wbcr_Factory437_Plugin' not found in wp-content/plugins/woo-cdek/components/peshkariki-delivery/includes/class-plugin.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\Delivery\\Base\\Delivery' not found in wp-content/plugins/woo-cdek/components/advanced-delivery/includes/advanced/includes/class.advanced-shipping-method.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Log\\LoggerInterface' not found in wp-content/plugins/woo-cdek/components/zaberi-tovar-delivery/vendor/psr/log/Psr/Log/AbstractLogger.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'WBCR\\FactoryClearfy228\\Pages\\Step' not found in wp-content/plugins/woo-cdek/libs/factory/clearfy/pages/setup-parts/class-step-custom.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: delivery, shipping, woocommerce, woocommerce shipping

woo-cdek/woo-cdek.php 85% from 13 tests

The main PHP file in "Woocommerce Shipping Details" ver. 1.1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.3" instead of "4.3")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected51,795 lines of code in 487 files:
LanguageFilesBlank linesComment linesLines of code
PHP3407,63016,50128,244
CSS471,4893918,841
JavaScript341,8881,6818,438
JSON10002,260
PO File125096291,456
LESS5275611,356
HTML1368557
YAML5132150
Cucumber2200148
reStructuredText786183119
Markdown6380108
Python1399240
XML26032
SVG10026
make281220

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity12.41
▷ Minimum class complexity1.00
▷ Maximum class complexity109.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces35
Interfaces14
Traits9
Classes252
▷ Abstract classes239.13%
▷ Concrete classes22990.87%
▷ Final classes20.87%
Methods1,920
▷ Static methods19510.16%
▷ Public methods1,56181.30%
▷ Protected methods26313.70%
▷ Private methods965.00%
Functions90
▷ Named functions2831.11%
▷ Anonymous functions6268.89%
Constants225
▷ Global constants12756.44%
▷ Class constants9843.56%
▷ Public constants98100.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
10 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
components/cdek-delivery/includes/Cdek/scripts/images/sdekActive.png2.64KB1.79KB▼ 31.93%
components/cdek-delivery/includes/Cdek/scripts/images/phone.png1.08KB0.32KB▼ 70.72%
components/cdek-delivery/includes/Cdek/scripts/images/close.png1.50KB0.90KB▼ 39.67%
components/cdek-delivery/includes/Cdek/scripts/images/sdekNActive.png2.73KB1.77KB▼ 35.14%
components/cdek-delivery/includes/Cdek/scripts/images/chooze.png2.33KB0.96KB▼ 58.69%