84% e-commerce-data-interchange

Code Review | EDI - Обмен данными между WooCommerce и 1С

WordPress plugin EDI - Обмен данными между WooCommerce и 1С scored84%from 54 tests.

About plugin

  • Plugin page: e-commerce-data-i...
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Apr 1, 2022
  • Latest release: Feb 12, 2023
  • Number of updates: 9
  • Update frequency: every 35.5 days
  • Top authors: webcodist (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

300+ active /3,129 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by EDI - Обмен данными между WooCommerce и 1С
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4244.59 ▲2.56
Dashboard /wp-admin3.72 ▲0.4261.22 ▲10.74
Posts /wp-admin/edit.php3.77 ▲0.4157.64 ▼0.22
Add New Post /wp-admin/post-new.php6.24 ▲0.3596.88 ▼3.15
Media Library /wp-admin/upload.php3.58 ▲0.3542.99 ▲8.50

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 424 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
_edi_last_xml_entry
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for EDI - Обмен данными между WooCommerce и 1С
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.35 ▲0.001.82 ▲0.0739.22 ▼2.00
Dashboard /wp-admin2,201 ▲305.50 ▼0.0286.55 ▼0.2340.81 ▼0.73
Posts /wp-admin/edit.php2,106 ▲62.10 ▲0.0835.83 ▼2.4132.67 ▼6.20
Add New Post /wp-admin/post-new.php1,532 ▲123.06 ▼0.07678.27 ▲43.1849.82 ▼3.54
Media Library /wp-admin/upload.php1,403 ▼04.19 ▼0.0195.60 ▼3.1742.25 ▼1.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • _edi_last_xml_entry
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 45× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/e-commerce-data-interchange/vendor/cmb2/cmb2/includes/types/CMB2_Type_Title.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'BytePerfect\\EDI\\Parsers\\XMLParser' not found in wp-content/plugins/e-commerce-data-interchange/src/Parsers/OffersXMLParser.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/e-commerce-data-interchange/vendor/cmb2/cmb2/example-functions.php:105
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Multi_Base' not found in wp-content/plugins/e-commerce-data-interchange/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Base' not found in wp-content/plugins/e-commerce-data-interchange/vendor/cmb2/cmb2/includes/CMB2.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/e-commerce-data-interchange/vendor/cmb2/cmb2/includes/rest-api/CMB2_REST.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/e-commerce-data-interchange/vendor/cmb2/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Select' not found in wp-content/plugins/e-commerce-data-interchange/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Select_Hierarchical.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Taxonomy_Base' not found in wp-content/plugins/e-commerce-data-interchange/vendor/cmb2/cmb2/includes/types/CMB2_Type_Taxonomy_Radio.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/e-commerce-data-interchange/vendor/cmb2/cmb2/includes/types/CMB2_Type_Counter_Base.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

e-commerce-data-interchange/e-commerce-data-interchange.php 92% from 13 tests

"EDI - Обмен данными между WooCommerce и 1С" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin59,275 lines of code in 274 files:
LanguageFilesBlank linesComment linesLines of code
PO File12114,41518,65832,557
PHP1033,2038,85011,717
JSON3006,670
CSS132531,1904,585
JavaScript83685841,459
Sass17306291,411
Markdown32490768
XML600108

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity17.62
▷ Minimum class complexity1.00
▷ Maximum class complexity188.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes107
▷ Abstract classes109.35%
▷ Concrete classes9790.65%
▷ Final classes11.03%
Methods795
▷ Static methods12816.10%
▷ Public methods61577.36%
▷ Protected methods17421.89%
▷ Private methods60.75%
Functions37
▷ Named functions3697.30%
▷ Anonymous functions12.70%
Constants21
▷ Global constants419.05%
▷ Class constants1780.95%
▷ Public constants17100.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
14 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/cmb2/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
vendor/cmb2/cmb2/images/ui-icons_454545_256x240.png4.27KB4.11KB▼ 3.78%
vendor/cmb2/cmb2/images/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
vendor/cmb2/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
vendor/cmb2/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%