73% vkontakte

Code Review | VKontakte

WordPress plugin VKontakte scored73%from 54 tests.

About plugin

  • Plugin page: vkontakte
  • Plugin version: 3.2.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.9
  • WordPress version: 6.3.1
  • First release: Mar 6, 2011
  • Latest release: Apr 3, 2022
  • Number of updates: 158
  • Update frequency: every 25.6 days
  • Top authors: yaryj (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /20,436 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.06MB] [CPU: ▼11.51ms] Passed 4 tests

Analyzing server-side resources used by VKontakte
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.13 ▼1.336.12 ▼32.32
Dashboard /wp-admin3.66 ▲0.3644.13 ▼6.77
Posts /wp-admin/edit.php3.71 ▲0.3647.86 ▲0.28
Add New Post /wp-admin/post-new.php6.24 ▲0.3692.50 ▼7.21
Media Library /wp-admin/upload.php3.59 ▲0.3635.90 ▲1.79
Help /wp-admin/admin.php?page=vkontakte-help3.5233.53
Settings /wp-admin/admin.php?page=vkontakte-settings3.5030.44

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 79 new files
Database: no new tables, 29 new options
New WordPress options
vkfull_share_text
vkfull_like_width
widget_recent-comments
vkfull_like_display_on_pages
vkfull_comments_graffiti
widget_recent-posts
db_upgraded
vkfull_comments_video
vkfull_like_verb
vkfull_comments_link
...

Browser metrics Passed 4 tests

VKontakte: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,842 ▲7114.26 ▼0.111.87 ▲0.1241.03 ▼0.60
Dashboard /wp-admin2,219 ▲425.56 ▼0.0985.37 ▼5.90109.39 ▲63.67
Posts /wp-admin/edit.php2,127 ▲241.98 ▲0.0444.33 ▲7.6039.07 ▲3.25
Add New Post /wp-admin/post-new.php1,557 ▲2918.10 ▼4.88618.28 ▼13.29121.77 ▲45.58
Media Library /wp-admin/upload.php1,421 ▲244.19 ▲0.0297.86 ▼15.4864.52 ▲18.02
Help /wp-admin/admin.php?page=vkontakte-help8642.0927.2926.36
Settings /wp-admin/admin.php?page=vkontakte-settings8481.9926.4626.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 29 options in the database
    • widget_vkontakte_group_widget
    • can_compress_scripts
    • widget_vkontakte_recommendations_widget
    • vkfull_like_type
    • vkfull_like_display_in_posts
    • vkfull_comments_link
    • vkfull_share_display_in_posts
    • vkfull_share_text
    • vkfull_comments_height
    • vkfull_comments_limit
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=vkontakte-settings
    • > Deprecated in wp-content/plugins/vkontakte/includes/admin/settings/class-admin-settings-page-api-integration-tab.php+19
    Non-static method Vkontakte_Settings::get_app_id() should not be called statically

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/vkontakte/includes/admin/settings/views/styles/html-content-buttons-template.php
    • > /wp-content/plugins/vkontakte/includes/frontend/views/styles/buttons.php
    • > /wp-content/plugins/vkontakte/includes/admin/views/fields/html-radio.php
  • 52× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: like_button_width in wp-content/plugins/vkontakte/includes/frontend/views/styles/buttons.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'Vkontakte_Widget' not found in wp-content/plugins/vkontakte/includes/widgets/class-widget-recommendations.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/vkontakte/includes/admin/views/fields/html-text.php:15
    • > PHP Notice
      Undefined variable: current_tab in wp-content/plugins/vkontakte/includes/admin/page/views/html-page.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/vkontakte/includes/admin/settings/views/html-form-tab.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Vkontakte_Assets' not found in wp-content/plugins/vkontakte/includes/frontend/class-frontend-assets.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Vkontakte_Widget' not found in wp-content/plugins/vkontakte/includes/widgets/class-widget-group.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_sections() on null in wp-content/plugins/vkontakte/includes/admin/page/views/html-page.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Vkontakte_Admin_Settings_Page_Form_Tab' not found in wp-content/plugins/vkontakte/includes/admin/settings/class-admin-settings-page-styles-tab.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Vkontakte_Assets' not found in wp-content/plugins/vkontakte/includes/admin/class-admin-assets.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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: comments, vkontakte, social, vk, likes...

vkontakte/vkontakte.php Passed 13 tests

The main PHP script in "VKontakte" version 3.2.0 is automatically included on every request by WordPress
69 characters long description:
The plugin adds a wide range of VKontakte functionality to your site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected3,106 lines of code in 76 files:
LanguageFilesBlank linesComment linesLines of code
PHP676279583,059
HTML70037
CSS21010

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity5.43
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity1.87
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes44
▷ Abstract classes818.18%
▷ Concrete classes3681.82%
▷ Final classes12.78%
Methods230
▷ Static methods4519.57%
▷ Public methods15667.83%
▷ Protected methods5624.35%
▷ Private methods187.83%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants164
▷ Global constants21.22%
▷ Class constants16298.78%
▷ Public constants162100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/vk-icon.png0.73KB0.56KB▼ 23.17%