84% russian-post-for-dokan-marketplace

Code Review | Фулфилмент от Почты России для маркетплейса Dokan

WordPress plugin Фулфилмент от Почты России для маркетплейса Dokan scored84%from 54 tests.

About plugin

  • Plugin page: russian-post-for-...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.0.2
  • WordPress version: 6.3.1
  • First release: Sep 8, 2022
  • Latest release: Dec 14, 2022
  • Number of updates: 18
  • Update frequency: every 5.5 days
  • Top authors: antondrob2 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.41ms] Passed 4 tests

This is a short check of server-side resources used by Фулфилмент от Почты России для маркетплейса Dokan
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0238.51 ▼3.20
Dashboard /wp-admin3.32 ▲0.0252.65 ▲2.32
Posts /wp-admin/edit.php3.37 ▲0.0150.33 ▼1.33
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.01 ▼11.46
Media Library /wp-admin/upload.php3.24 ▲0.0136.80 ▼1.64

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Фулфилмент от Почты России для маркетплейса Dokan
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.19 ▼0.151.57 ▼0.5845.27 ▲3.59
Dashboard /wp-admin2,195 ▲155.50 ▼0.1794.88 ▼3.7647.62 ▲7.00
Posts /wp-admin/edit.php2,100 ▼02.03 ▲0.0140.03 ▼1.5234.64 ▼2.54
Add New Post /wp-admin/post-new.php1,526 ▼023.24 ▲0.26686.83 ▲19.7953.82 ▲2.90
Media Library /wp-admin/upload.php1,397 ▼34.18 ▼0.1598.31 ▼20.7943.32 ▼5.47

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Russian_Post\\Includes\\add_filter() in wp-content/plugins/russian-post-for-dokan-marketplace/includes/dokan-custom-settings-tab.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Email' not found in wp-content/plugins/russian-post-for-dokan-marketplace/emails/VendorCancelOrderRequest.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/russian-post-for-dokan-marketplace/includes/class-shipping-russian-post-courier.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/russian-post-for-dokan-marketplace/vendor/multiple-packages-for-woocommerce/multiple-packages-shipping.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/russian-post-for-dokan-marketplace/vendor/multiple-packages-for-woocommerce/multiple-packages-shipping.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Russian_Post\\Includes\\Functions\\add_filter() in wp-content/plugins/russian-post-for-dokan-marketplace/includes/functions.php:44
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/russian-post-for-dokan-marketplace/includes/class-shipping-russian-post.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: marketplace, delivery, dokan, woocommerce, shipping

russian-post-for-dokan-marketplace/russian-post-for-dokan-marketplace.php 85% from 13 tests

The main PHP file in "Фулфилмент от Почты России для маркетплейса Dokan" ver. 1.0.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:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Plugin Name: It is recommended to keep the plugin name shorter than 70 characters (currently 87 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected2,816 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP134423682,499
JavaScript45033243
CSS37374

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity43.00
▷ Minimum class complexity3.00
▷ Maximum class complexity169.00
Average method complexity5.67
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods81
▷ Static methods00.00%
▷ Public methods8098.77%
▷ Protected methods00.00%
▷ Private methods11.23%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin