90% russian-post-and-ems-for-woocommerce

Code Review | Russian Post and EMS for WooCommerce

WordPress plugin Russian Post and EMS for WooCommerce scored90%from 54 tests.

About plugin

  • Plugin page: russian-post-and-...
  • Plugin version: 1.3.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.8
  • WordPress version: 6.3.1
  • First release: Jul 23, 2016
  • Latest release: Oct 25, 2021
  • Number of updates: 43
  • Update frequency: every 44.7 days
  • Top authors: artemkomarov (100%)

Code review

54 tests

User reviews

32 reviews

Install metrics

2,000+ active /40,319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

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

A check of server-side resources used by Russian Post and EMS for WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.50 ▼1.67
Dashboard /wp-admin3.31 ▲0.0048.88 ▲0.27
Posts /wp-admin/edit.php3.36 ▲0.0048.38 ▲3.23
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.16 ▼6.81
Media Library /wp-admin/upload.php3.23 ▲0.0032.85 ▲1.99

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Russian Post and EMS for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.81 ▲0.441.93 ▲0.1241.39 ▼3.97
Dashboard /wp-admin2,206 ▲184.85 ▼0.0396.19 ▼11.1938.66 ▼7.21
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0443.58 ▲9.8836.71 ▲1.33
Add New Post /wp-admin/post-new.php1,514 ▼517.45 ▼5.73687.04 ▲1.1165.01 ▲8.47
Media Library /wp-admin/upload.php1,388 ▼04.22 ▲0.0192.54 ▼4.6943.48 ▲1.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: woocommerce, woocommerce shipping, ecommerce, shipping

russian-post-and-ems-for-woocommerce/russian-post-and-ems-for-woocommerce.php 92% from 13 tests

The principal PHP file in "Russian Post and EMS for WooCommerce" v. 1.3.8 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Requires at least: Required version must match the one declared in readme.txt ("5.4" instead of "4.0")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected1,882 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP83394441,882

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity51.00
▷ Minimum class complexity6.00
▷ Maximum class complexity162.00
Average method complexity4.85
▷ Minimum method complexity1.00
▷ Maximum method complexity70.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods52
▷ Static methods47.69%
▷ Public methods5198.08%
▷ Protected methods11.92%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
3 compressed PNG files occupy 0.12MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/pvz-select.png94.53KB94.92KB0.00%
assets/img/state-city-select.png16.72KB15.93KB▼ 4.74%
assets/img/otpravka.png9.62KB9.59KB0.32%