68% vkcommerce

Code Review | VkCommerce

WordPress plugin VkCommerce scored68%from 54 tests.

About plugin

  • Plugin page: vkcommerce
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.9
  • WordPress version: 6.3.1
  • First release: Feb 23, 2022
  • Latest release: Apr 26, 2022
  • Number of updates: 5
  • Update frequency: every 12.4 days
  • Top authors: yaryj (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /2,252 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.92ms] Passed 4 tests

Server-side resources used by VkCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0442.11 ▲1.81
Dashboard /wp-admin3.37 ▲0.0356.18 ▼1.61
Posts /wp-admin/edit.php3.48 ▲0.1345.44 ▲7.12
Add New Post /wp-admin/post-new.php5.95 ▲0.0784.07 ▼14.28
Media Library /wp-admin/upload.php3.29 ▲0.0634.21 ▼1.60
Help /wp-admin/admin.php?page=vkcommerce-help3.3131.82
Settings /wp-admin/admin.php?page=vkcommerce-settings3.2834.49

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 59 new files
Database: 1 new table, 7 new options
New tables
wp_vkcommerce_products
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
theysaidso_admin_options
vkcommerce_db_version
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for VkCommerce
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,852 ▲9114.36 ▲0.011.94 ▲0.1345.32 ▲2.54
Dashboard /wp-admin2,236 ▲555.64 ▼0.0784.81 ▼26.4436.31 ▼8.93
Posts /wp-admin/edit.php2,138 ▲352.02 ▲0.0635.26 ▼4.7534.24 ▼3.26
Add New Post /wp-admin/post-new.php1,547 ▲1223.42 ▲5.26663.12 ▲21.5252.69 ▼7.60
Media Library /wp-admin/upload.php1,438 ▲354.20 ▼0.1297.39 ▼1.8941.81 ▼1.62
Help /wp-admin/admin.php?page=vkcommerce-help9372.1222.4324.73
Settings /wp-admin/admin.php?page=vkcommerce-settings8192.0427.1825.40

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_vkcommerce_products
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • vkcommerce_db_version
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/vkcommerce/includes/admin/views/fields/html-radio.php
  • 46× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/vkcommerce/includes/admin/views/fields/html-textarea.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'VkCommerce_Admin_Page_Tab' not found in wp-content/plugins/vkcommerce/includes/admin/settings/class-admin-settings-page-form-tab.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'VkCommerce_Admin_Settings_Page_Form_Tab' not found in wp-content/plugins/vkcommerce/includes/admin/settings/class-admin-settings-page-api-integration-tab.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'VkCommerce_Products_Manager' not found in wp-content/plugins/vkcommerce/includes/admin/class-admin-ajax-handler.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/vkcommerce/includes/admin/views/html-product-data-panel.php:56
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/vkcommerce/includes/class-install.php:14
    • > PHP Warning
      Use of undefined constant VKCOMMERCE_VERSION - assumed 'VKCOMMERCE_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/vkcommerce/includes/class-install.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/vkcommerce/includes/class-vkcommerce.php:50
    • > PHP Fatal error
      Uncaught Error: Class 'VkCommerce_Products_Manager' not found in wp-content/plugins/vkcommerce/includes/admin/class-admin-product-data-tabs.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/vkcommerce/includes/admin/settings/views/html-access-token.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: woocommerce, vkontakte, social, ecommerce, products

vkcommerce/vkcommerce.php Passed 13 tests

This is the main PHP file of "VkCommerce" version 1.1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
117 characters long description:
The plugin exports photos and descriptions of products from your online store to the storefront in a VKontakte group.

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
Everything looks great! No dangerous files found in this plugin3,608 lines of code in 57 files:
LanguageFilesBlank linesComment linesLines of code
PHP548711,0903,455
JavaScript1330104
CSS110048
JSON1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity14.22
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes32
▷ Abstract classes39.38%
▷ Concrete classes2990.62%
▷ Final classes13.45%
Methods241
▷ Static methods4016.60%
▷ Public methods17170.95%
▷ Protected methods2610.79%
▷ Private methods4418.26%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants61
▷ Global constants914.75%
▷ Class constants5285.25%
▷ Public constants52100.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
There were not PNG files found in your plugin