84% yandex-go-delivery

Code Review | Yandex Delivery

WordPress plugin Yandex Delivery scored84%from 54 tests.

About plugin

  • Plugin page: yandex-go-delivery
  • Plugin version: 1.11.5
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Dec 15, 2020
  • Latest release: Jun 14, 2022
  • Number of updates: 21
  • Update frequency: every 26.3 days
  • Top authors: yandexlogistics (71.43%)webtemyk (19.05%)creativemotion (19.05%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /3,762 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
This plugin's installer ran successfully

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

Server-side resources used by Yandex Delivery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.49 ▼5.32
Dashboard /wp-admin3.31 ▲0.0143.84 ▼5.15
Posts /wp-admin/edit.php3.36 ▲0.0146.14 ▼4.44
Add New Post /wp-admin/post-new.php5.89 ▲0.0188.87 ▼13.49
Media Library /wp-admin/upload.php3.23 ▲0.0133.10 ▲0.96

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 1,662 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Yandex Delivery
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲3513.20 ▼1.201.61 ▼0.2640.23 ▲0.45
Dashboard /wp-admin2,212 ▲274.87 ▼0.99106.96 ▲4.9344.63 ▲8.03
Posts /wp-admin/edit.php2,094 ▲52.04 ▲0.0240.11 ▲2.5035.68 ▲1.47
Add New Post /wp-admin/post-new.php1,548 ▲3418.25 ▲0.64592.17 ▼68.8853.74 ▼3.98
Media Library /wp-admin/upload.php1,394 ▲34.20 ▼0.0696.77 ▼9.5439.66 ▼6.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

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
Please take a closer look at the following
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'libphonenumber\\Leniency\\AbstractLeniency' not found in wp-content/plugins/yandex-go-delivery/core/vendor/giggsey/libphonenumber-for-php/src/Leniency/ExactGrouping.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'libphonenumber\\MetadataLoaderInterface' not found in wp-content/plugins/yandex-go-delivery/core/vendor/giggsey/libphonenumber-for-php/src/DefaultMetadataLoader.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'libphonenumber\\MatcherAPIInterface' not found in wp-content/plugins/yandex-go-delivery/core/vendor/giggsey/libphonenumber-for-php/src/RegexBasedMatcher.php:10
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/yandex-go-delivery/yandex-go-delivery.php on line 16
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/yandex-go-delivery/yandex-go-delivery.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'libphonenumber\\Leniency\\AbstractLeniency' not found in wp-content/plugins/yandex-go-delivery/core/vendor/giggsey/libphonenumber-for-php/src/Leniency/Possible.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'libphonenumber\\Leniency\\AbstractLeniency' not found in wp-content/plugins/yandex-go-delivery/core/vendor/giggsey/libphonenumber-for-php/src/Leniency/Valid.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'YandexTaxi\\Delivery\\Http\\Client' not found in wp-content/plugins/yandex-go-delivery/lib/Http/WpHttpClient.php:13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/yandex-go-delivery/yandex-go-delivery.php on line 16
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Yandex_Taxi_Admin_Menu' not found in wp-content/plugins/yandex-go-delivery/includes/views/tabs.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: shipping, shipment, delivery, shipping method, woocommerce shipping

yandex-go-delivery/yandex-go-delivery.php 85% from 13 tests

The main file in "Yandex Delivery" v. 1.11.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.4.1" instead of "5.0")
  • Description: Please keep the plugin description shorter than 140 characters (currently 157 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin602,374 lines of code in 1,511 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,4805,17118,317597,093
PO File59091,2092,220
JavaScript12257601,582
CSS3118156832
JSON410336
Markdown3860206
Ant112055
YAML29135
XML13015

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.81
▷ Minimum class complexity1.00
▷ Maximum class complexity366.00
Average method complexity2.45
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces39
Interfaces7
Traits0
Classes141
▷ Abstract classes64.26%
▷ Concrete classes13595.74%
▷ Final classes139.63%
Methods1,105
▷ Static methods24121.81%
▷ Public methods83875.84%
▷ Protected methods887.96%
▷ Private methods17916.20%
Functions70
▷ Named functions4462.86%
▷ Anonymous functions2637.14%
Constants197
▷ Global constants105.08%
▷ Class constants18794.92%
▷ Public constants12466.31%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.23MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/lib/intlTelInput/img/flags@2x.png170.28KB68.04KB▼ 60.04%
assets/lib/intlTelInput/img/flags.png69.20KB23.42KB▼ 66.16%
assets/favicon_he_IL.png0.32KB0.25KB▼ 22.96%