83% cash-on-delivery-of-russian-post-or-ems-for-woocommerce

Code Review | Cash on Delivery of Russian Post or EMS For WooCommerce

WordPress plugin Cash on Delivery of Russian Post or EMS For WooCommerce scored83%from 54 tests.

About plugin

  • Plugin page: cash-on-delivery-...
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Jul 30, 2016
  • Latest release: Dec 24, 2017
  • Number of updates: 17
  • Update frequency: every 30.1 days
  • Top authors: artemkomarov (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /4,260 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.03MB] [CPU: ▼2.00ms] Passed 4 tests

A check of server-side resources used by Cash on Delivery of Russian Post or EMS For WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0346.57 ▲1.51
Dashboard /wp-admin3.34 ▲0.0450.66 ▼3.34
Posts /wp-admin/edit.php3.39 ▲0.0349.88 ▼4.19
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.97 ▼1.96
Media Library /wp-admin/upload.php3.26 ▲0.0341.74 ▲1.91

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Cash on Delivery of Russian Post or EMS For WooCommerce: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7914.25 ▼0.541.87 ▼0.0838.53 ▼5.33
Dashboard /wp-admin2,221 ▲215.85 ▲0.03103.18 ▼15.2839.12 ▼6.69
Posts /wp-admin/edit.php2,100 ▲32.04 ▲0.0136.91 ▲0.4233.43 ▼6.37
Add New Post /wp-admin/post-new.php1,526 ▼1417.64 ▼5.36651.32 ▼9.5665.67 ▲4.33
Media Library /wp-admin/upload.php1,397 ▼64.21 ▲0.01102.39 ▼3.5747.90 ▲1.23

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

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

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)
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 fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/cash-on-delivery-of-russian-post-or-ems-for-woocommerce/cod-payment-gateway-russian-post.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% 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
5 plugin tags: ecommerce, cash on delivery, woocommerce, woocommerce gateway, gateway

cash-on-delivery-of-russian-post-or-ems-for-woocommerce/cod-payment-gateway-russian-post.php 77% from 13 tests

The main PHP file in "Cash on Delivery of Russian Post or EMS For WooCommerce" ver. 1.4 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 match the one declared in readme.txt ("4.4" instead of "3.0.0")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("cash-on-delivery-of-russian-post-or-ems-for-woocommerce.php" instead of "cod-payment-gateway-russian-post.php")

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 plugin264 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP15056185
PO File1171779

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity37.00
▷ Minimum class complexity37.00
▷ Maximum class complexity37.00
Average method complexity6.14
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
There were not PNG files found in your plugin