63% woocommerce-and-1centerprise-data-exchange

Code Review | WooCommerce and 1C:Enterprise/1С:Предприятие Data Exchange

WordPress plugin WooCommerce and 1C:Enterprise/1С:Предприятие Data Exchange scored63%from 54 tests.

About plugin

  • Plugin page: woocommerce-and-1...
  • Plugin version: 0.9.20
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.4
  • WordPress version: 6.3.1
  • First release: Nov 9, 2014
  • Latest release: Jun 18, 2023
  • Number of updates: 411
  • Update frequency: every 7.7 days
  • Top authors: sgtpep (100%)

Code review

54 tests

User reviews

27 reviews

Install metrics

1,000+ active /34,981 total downloads

Benchmarks

Plugin footprint 48% 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.15MB] [CPU: ▲1.11ms] Passed 4 tests

This is a short check of server-side resources used by WooCommerce and 1C:Enterprise/1С:Предприятие Data Exchange
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1739.76 ▼4.19
Dashboard /wp-admin3.46 ▲0.1555.51 ▲9.24
Posts /wp-admin/edit.php3.57 ▲0.2152.28 ▲6.71
Add New Post /wp-admin/post-new.php6.04 ▲0.1589.03 ▼1.00
Media Library /wp-admin/upload.php3.38 ▲0.1537.38 ▲2.91

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

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

Browser metrics Passed 4 tests

WooCommerce and 1C:Enterprise/1С:Предприятие Data Exchange: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲7513.26 ▼1.101.71 ▼0.3340.89 ▼1.60
Dashboard /wp-admin2,219 ▲315.88 ▼0.0298.96 ▼6.5440.85 ▲1.02
Posts /wp-admin/edit.php2,098 ▲92.05 ▲0.0242.58 ▲7.1538.71 ▲7.36
Add New Post /wp-admin/post-new.php1,546 ▲423.13 ▲4.87679.17 ▲49.0056.08 ▼13.17
Media Library /wp-admin/upload.php1,392 ▲74.21 ▼0.0097.74 ▼4.3941.85 ▼0.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Compile error in wp-content/plugins/woocommerce-and-1centerprise-data-exchange/exchange.php+13
    Cannot redeclare wc1c_query_vars() (previously declared in wp-content/plugins/woocommerce-and-1centerprise-data-exchange/exchange.php:13)
  • Uninstaller has failed for this plugin, leaving 17 files (0.18MB) in the plugin directory
    • (new file) .gitignore
    • (new file) exchange/success.php
    • (new file) clean.php
    • (new file) exchange/orders.php
    • (new file) admin.php
    • (new file) exchange/query.php
    • (new file) LICENSE.txt
    • (new file) exchange.php
    • (new file) exchange/offers.php
    • (new file) exchange/import.php
    • ...
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • recovery_mode_email_last_sent

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/woocommerce-and-1centerprise-data-exchange/exchange.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function current_user_can() in wp-content/plugins/woocommerce-and-1centerprise-data-exchange/clean.php:3

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt might help

woocommerce-and-1centerprise-data-exchange/woocommerce-1c.php 85% from 13 tests

The primary PHP file in "WooCommerce and 1C:Enterprise/1С:Предприятие Data Exchange" version 0.9.20 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • 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 ("woocommerce-and-1centerprise-data-exchange.php" instead of "woocommerce-1c.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin2,481 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP10542802,422
PO File1121448
Bourne Again Shell15011

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions99
▷ Named functions99100.00%
▷ Anonymous functions00.00%
Constants28
▷ Global constants28100.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 files were detected