94% cdek-for-woocommerce

Code Review | CDEK for WooCommerce

WordPress plugin CDEK for WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: cdek-for-woocommerce
  • Plugin version: 1.1.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8
  • WordPress version: 5.8.1
  • First release: Jul 11, 2020
  • Latest release: Nov 26, 2021
  • Number of updates: 22
  • Update frequency: every 22.9 days
  • Top authors: artemkomarov (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active / 15,372 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼146.78ms] Passed 4 tests

This is a short check of server-side resources used by CDEK for WooCommerce
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0328.28 ▲1.84
Dashboard /wp-admin3.09 ▲0.0236.56 ▼4.43
Posts /wp-admin/edit.php3.14 ▲0.0338.13 ▼2.44
Add New Post /wp-admin/post-new.php5.45 ▲0.0173.48 ▼582.10
Media Library /wp-admin/upload.php3.03 ▲0.0328.25 ▲3.87

Server storage [IO: ▲34.02MB] [DB: ▲0.00MB] 67% from 3 tests

Input-output and database impact of this plugin
Just a few items left to fix
  • Filesystem usage must be lower than 25MB (currently using 34.02MB)
Filesystem: 24 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for CDEK for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,666 ▲6515.49 ▼0.4810.24 ▲0.7975.83 ▼3.53
Dashboard /wp-admin2,930 ▲346.09 ▼0.09128.82 ▲1.32174.03 ▲5.03
Posts /wp-admin/edit.php2,740 ▼33.23 ▼0.0064.61 ▼3.35137.05 ▼8.91
Add New Post /wp-admin/post-new.php3,807 ▲7118.53 ▲0.17418.26 ▼125.09160.83 ▼33.40
Media Library /wp-admin/upload.php1,752 ▼05.45 ▼0.04144.71 ▼0.56189.01 ▼0.97

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/cdek-for-woocommerce/includes/controls/control-pvz-select-list.php:16

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


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: woocommerce shipping, shipping, cdek, woocommerce, ecommerce

cdek-for-woocommerce/cdek-for-woocommerce.php 92% from 13 tests

The principal PHP file in "CDEK for WooCommerce" v. 1.1.6 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Requires at least: The required version number did not match the one declared in readme.txt ("5.4" instead of "5.5")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin933,584 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity30.43
▷ Minimum class complexity4.00
▷ Maximum class complexity100.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
▷ Static methods3344.59%
▷ Public methods7398.65%
▷ Protected methods11.35%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions2100.00%
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 compressed PNG files occupy 0.12MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/state-city-select.png16.72KB15.93KB▼ 4.74%
assets/images/order.png27.92KB27.51KB▼ 1.46%