84% cdek-for-woocommerce

Code Review | CDEK for WooCommerce

WordPress plugin CDEK for WooCommerce scored84%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: 6.3.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

13 reviews

Install metrics

1,000+ active /19,267 total downloads

Benchmarks

Plugin footprint 82% from 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.01MB] [CPU: ▼10.79ms] 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 /3.47 ▲0.0033.44 ▼9.97
Dashboard /wp-admin3.31 ▼0.0443.35 ▼16.19
Posts /wp-admin/edit.php3.36 ▲0.0043.27 ▼5.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.30 ▼11.72
Media Library /wp-admin/upload.php3.23 ▲0.0033.09 ▲0.11

Server storage [IO: ▲34.02MB] [DB: ▲0.07MB] 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, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for CDEK for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.41 ▲0.061.63 ▼0.0436.47 ▼3.23
Dashboard /wp-admin2,198 ▲215.61 ▲0.1083.05 ▼1.4037.08 ▼7.27
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0238.12 ▲3.5535.70 ▼1.12
Add New Post /wp-admin/post-new.php1,526 ▼323.69 ▲0.72636.91 ▼2.0556.17 ▲6.13
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.0093.93 ▼6.3744.15 ▲2.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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
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

Optimizations

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, cdek, woocommerce shipping, ecommerce, shipping

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
JSON300931,128
PHP113405922,304
JavaScript117078
CSS19057
HTML10017

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
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods74
▷ Static methods3344.59%
▷ Public methods7398.65%
▷ Protected methods11.35%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants3
▷ 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/pvz-select.png61.24KB61.00KB0.38%
assets/images/intakes.png17.44KB18.26KB0.00%
assets/images/order.png27.92KB27.51KB▼ 1.46%
assets/images/state-city-select.png16.72KB15.93KB▼ 4.74%