78% uv-b-connector-for-woocommerce

Code Review | Utánvét Ellenőr

WordPress plugin Utánvét Ellenőr scored78%from 54 tests.

About plugin

  • Plugin page: uv-b-connector-fo...
  • Plugin version: 1.10.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 17, 2020
  • Latest release: Nov 6, 2023
  • Number of updates: 36
  • Update frequency: every 37.8 days
  • Top authors: otto.radics (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,733 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.35MB] [CPU: ▼3.22ms] Passed 4 tests

A check of server-side resources used by Utánvét Ellenőr
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.84 ▲0.3839.69 ▲0.13
Dashboard /wp-admin3.69 ▲0.3947.40 ▼10.26
Posts /wp-admin/edit.php3.74 ▲0.3850.55 ▲4.30
Add New Post /wp-admin/post-new.php6.21 ▲0.3294.00 ▼0.06
Media Library /wp-admin/upload.php3.55 ▲0.3236.69 ▼2.67

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 198 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
uvb_connector_woocommerce_options

Browser metrics Passed 4 tests

Checking browser requirements for Utánvét Ellenőr
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲3414.31 ▲0.351.67 ▼0.0638.72 ▼5.62
Dashboard /wp-admin2,204 ▲275.70 ▲0.0889.91 ▼4.0940.82 ▼1.53
Posts /wp-admin/edit.php2,106 ▲31.95 ▼0.0138.68 ▼0.1636.54 ▲1.78
Add New Post /wp-admin/post-new.php1,531 ▲523.23 ▲0.29611.19 ▼174.6151.75 ▲2.56
Media Library /wp-admin/upload.php1,397 ▼34.16 ▼0.0796.44 ▼26.6043.17 ▼6.25
UV-B Connector /wp-admin/uvb-connector-woocommerce.php260.410.0814.13

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • uvb_connector_woocommerce_options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 50× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/uv-b-connector-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/uv-b-connector-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/uv-b-connector-for-woocommerce/vendor/guzzlehttp/psr7/src/LazyOpenStream.php:13
    • > PHP Warning
      Use of undefined constant UVB_CONNECTOR_VENDOR_AUTOLOAD_PATH - assumed 'UVB_CONNECTOR_VENDOR_AUTOLOAD_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/uv-b-connector-for-woocommerce/admin/class-uvb-connector-woocommerce-admin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/uv-b-connector-for-woocommerce/vendor/guzzlehttp/psr7/src/InflateStream.php:20
    • > PHP Fatal error
      require(): Failed opening required 'UVB_CONNECTOR_VENDOR_AUTOLOAD_PATH' (include_path='.:/usr/share/php') in wp-content/plugins/uv-b-connector-for-woocommerce/admin/class-uvb-connector-woocommerce-admin.php on line 3
    • > PHP Warning
      require(UVB_CONNECTOR_VENDOR_AUTOLOAD_PATH): failed to open stream: No such file or directory in wp-content/plugins/uv-b-connector-for-woocommerce/admin/class-uvb-connector-woocommerce-admin.php on line 3
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/uv-b-connector-for-woocommerce/vendor/guzzlehttp/psr7/src/BufferStream.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/uv-b-connector-for-woocommerce/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/uv-b-connector-for-woocommerce/vendor/guzzlehttp/guzzle/src/Exception/ServerException.php:7

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/uvb-connector-woocommerce.php
    • > Network (severe)
    wp-admin/uvb-connector-woocommerce.php - Failed to load resource: the server responded with a status of 404 (Not Found)

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
8 plugin tags: szrs, utnvt, filter, ellenr, cash on delivery...

uv-b-connector-for-woocommerce/uvb-connector-woocommerce.php 85% from 13 tests

The main PHP script in "Utánvét Ellenőr" version 1.10.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("uv-b-connector-for-woocommerce.php" instead of "uvb-connector-woocommerce.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin32,744 lines of code in 178 files:
LanguageFilesBlank linesComment linesLines of code
PHP1402,5006,82827,799
Markdown151,18103,551
JSON11001,164
YAML6263103
PO File1162063
JavaScript17125
SVG10016
Dockerfile18010
make1409
CSS1144

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity16.80
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces14
Interfaces15
Traits2
Classes91
▷ Abstract classes00.00%
▷ Concrete classes91100.00%
▷ Final classes2325.27%
Methods793
▷ Static methods16620.93%
▷ Public methods64681.46%
▷ Protected methods40.50%
▷ Private methods14318.03%
Functions164
▷ Named functions7243.90%
▷ Anonymous functions9256.10%
Constants163
▷ Global constants4326.38%
▷ Class constants12073.62%
▷ Public constants120100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin