73% eshoplogisticru

Code Review | Расчет доставки в корзине и карточке товара: СДЭК, DPD, Boxberry, PickPoint, IML, Ozon Rocket, Почта России, Деловые Линии, ПЭК, Dostavista, GTD, Байкал Сервис, ЖелДорЭкспедиция и др.

WordPress plugin Расчет доставки в корзине и карточке товара: СДЭК, DPD, Boxberry, PickPoint, IML, Ozon Rocket, Почта России, Деловые Линии, ПЭК, Dostavista, GTD, Байкал Сервис, ЖелДорЭкспедиция и др. scored73%from 54 tests.

About plugin

  • Plugin page: eshoplogisticru
  • Plugin version: 2.0.63
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.8
  • WordPress version: 6.3.1
  • First release: Aug 10, 2021
  • Latest release: Nov 26, 2023
  • Number of updates: 141
  • Update frequency: every 5.9 days
  • Top authors: eshoplogistic (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /9,803 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.38MB] [CPU: ▼3.32ms] Passed 4 tests

This is a short check of server-side resources used by Расчет доставки в корзине и карточке товара: СДЭК, DPD, Boxberry, PickPoint, IML, Ozon Rocket, Почта России, Деловые Линии, ПЭК, Dostavista, GTD, Байкал Сервис, ЖелДорЭкспедиция и др.
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3740.43 ▼0.45
Dashboard /wp-admin3.73 ▲0.4248.44 ▼3.43
Posts /wp-admin/edit.php3.78 ▲0.4249.92 ▲0.69
Add New Post /wp-admin/post-new.php6.25 ▲0.3684.39 ▼10.10
Media Library /wp-admin/upload.php3.59 ▲0.3638.03 ▲4.22

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 136 new files
Database: 1 new table, 7 new options
New tables
wc_esl_shipping_methods
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
wc_esl_migrations_history
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Расчет доставки в корзине и карточке товара: СДЭК, DPD, Boxberry, PickPoint, IML, Ozon Rocket, Почта России, Деловые Линии, ПЭК, Dostavista, GTD, Байкал Сервис, ЖелДорЭкспедиция и др.
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8014.25 ▼0.111.87 ▲0.1735.79 ▼8.01
Dashboard /wp-admin2,210 ▲335.61 ▼0.0794.34 ▼5.7942.49 ▼4.74
Posts /wp-admin/edit.php2,112 ▲122.01 ▼0.0140.07 ▲3.4236.66 ▼0.02
Add New Post /wp-admin/post-new.php1,547 ▲2125.09 ▲1.97627.56 ▼53.1065.70 ▲21.21
Media Library /wp-admin/upload.php1,412 ▲94.18 ▲0.0496.88 ▲1.4942.30 ▲2.50

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wc_esl_shipping_methods
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • wc_esl_migrations_history

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Please fix the following
  • 43× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: time in wp-content/plugins/eshoplogisticru/views/checkout/time.php on line 1
    • > PHP Fatal error
      Uncaught Error: Class 'eshoplogistic\\WCEshopLogistic\\Classes\\Shipping\\Base' not found in wp-content/plugins/eshoplogisticru/Classes/Shipping/Methods/YandexDoor.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'eshoplogistic\\WCEshopLogistic\\Classes\\Shipping\\Base' not found in wp-content/plugins/eshoplogisticru/Classes/Shipping/Methods/GrastinDoor.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'eshoplogistic\\WCEshopLogistic\\Classes\\Shipping\\Base' not found in wp-content/plugins/eshoplogisticru/Classes/Shipping/Methods/YandexTerminal.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'eshoplogistic\\WCEshopLogistic\\Classes\\Shipping\\Base' not found in wp-content/plugins/eshoplogisticru/Classes/Shipping/Methods/CustomDoor.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'eshoplogistic\\WCEshopLogistic\\Classes\\Shipping\\Base' not found in wp-content/plugins/eshoplogisticru/Classes/Shipping/Methods/FrameMixed.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'eshoplogistic\\WCEshopLogistic\\Classes\\Shipping\\Base' not found in wp-content/plugins/eshoplogisticru/Classes/Shipping/Methods/PostrfTerminal.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/eshoplogisticru/views/checkout/comment.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'eshoplogistic\\WCEshopLogistic\\Classes\\Shipping\\Base' not found in wp-content/plugins/eshoplogisticru/Classes/Shipping/Methods/DpdTerminal.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'eshoplogistic\\WCEshopLogistic\\Classes\\Shipping\\Base' not found in wp-content/plugins/eshoplogisticru/Classes/Shipping/Methods/ImlTerminal.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: Please take inspiration from this readme.txt

eshoplogisticru/wc-eshop-logistic.php 62% from 13 tests

The principal PHP file in "Расчет доставки в корзине и карточке товара: СДЭК, DPD, Boxberry, PickPoint, IML, Ozon Rocket, Почта России, Деловые Линии, ПЭК, Dostavista, GTD, Байкал Сервис, ЖелДорЭкспедиция и др." v. 2.0.63 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 220 characters long)
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("eshoplogisticru.php" instead of "wc-eshop-logistic.php")
  • Plugin Name: Please shorten the plugin name (currently 98 characters long instead of max. 70)

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
No dangerous file extensions were detected13,628 lines of code in 134 files:
LanguageFilesBlank linesComment linesLines of code
PHP1051,6757666,990
JavaScript189034404,583
CSS9199111,663
JSON100390
Markdown1102

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.40
Average class complexity8.46
▷ Minimum class complexity1.00
▷ Maximum class complexity103.00
Average method complexity3.47
▷ Minimum method complexity1.00
▷ Maximum method complexity41.00
Code structure
Namespaces17
Interfaces6
Traits0
Classes88
▷ Abstract classes22.27%
▷ Concrete classes8697.73%
▷ Final classes11.16%
Methods293
▷ Static methods41.37%
▷ Public methods26389.76%
▷ Protected methods20.68%
▷ Private methods289.56%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants19
▷ Global constants842.11%
▷ Class constants1157.89%
▷ Public constants11100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin