79% import-vk-comments

Code Review | Import Vk Comments

WordPress plugin Import Vk Comments scored79%from 54 tests.

About plugin

  • Plugin page: import-vk-comments
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.1-5.6
  • WordPress version: 6.3.1
  • First release: Dec 23, 2020
  • Latest release: Dec 23, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: denandteam (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /519 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
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼5.85ms] Passed 4 tests

This is a short check of server-side resources used by Import Vk Comments
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0843.74 ▲9.15
Dashboard /wp-admin3.39 ▲0.0543.80 ▼9.17
Posts /wp-admin/edit.php3.50 ▲0.1544.70 ▼2.28
Add New Post /wp-admin/post-new.php5.99 ▲0.1082.48 ▼15.17
Media Library /wp-admin/upload.php3.31 ▲0.0835.85 ▲3.21

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 366 new files
Database: no new tables, 9 new options
New WordPress options
widget_recent-comments
can_compress_scripts
ivc_client_id
db_upgraded
ivc_pages
ivc_access_token
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Import Vk Comments
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,904 ▲13314.02 ▼0.275.48 ▲3.5041.12 ▲4.29
Dashboard /wp-admin2,221 ▲325.80 ▲0.9199.46 ▼25.2240.04 ▼3.55
Posts /wp-admin/edit.php2,113 ▲242.01 ▼0.0140.71 ▲1.3735.32 ▲5.14
Add New Post /wp-admin/post-new.php1,536 ▼123.19 ▼0.16590.61 ▼57.9050.56 ▼14.74
Media Library /wp-admin/upload.php1,406 ▲214.20 ▲0.0095.77 ▼4.7843.22 ▼0.51

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/import-vk-comments/public/partials/import-vk-comments-public-display.php
  • 161× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'VK\\TransportClient\\TransportClient' not found in wp-content/plugins/import-vk-comments/vendor/vkcom/vk-php-sdk/src/VK/TransportClient/Curl/CurlHttpClient.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'VK\\Exceptions\\VKApiException' not found in wp-content/plugins/import-vk-comments/vendor/vkcom/vk-php-sdk/src/VK/Exceptions/Api/VKApiAdsObjectDeletedException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'VK\\Exceptions\\VKApiException' not found in wp-content/plugins/import-vk-comments/vendor/vkcom/vk-php-sdk/src/VK/Exceptions/Api/VKApiMessagesDenySendException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'VK\\Exceptions\\VKApiException' not found in wp-content/plugins/import-vk-comments/vendor/vkcom/vk-php-sdk/src/VK/Exceptions/Api/VKApiWallAddPostException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'VK\\Exceptions\\VKApiException' not found in wp-content/plugins/import-vk-comments/vendor/vkcom/vk-php-sdk/src/VK/Exceptions/Api/VKApiAuthDelayException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'VK\\Exceptions\\VKApiException' not found in wp-content/plugins/import-vk-comments/vendor/vkcom/vk-php-sdk/src/VK/Exceptions/Api/VKApiPollsAccessException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'VK\\Exceptions\\VKApiException' not found in wp-content/plugins/import-vk-comments/vendor/vkcom/vk-php-sdk/src/VK/Exceptions/Api/VKApiParamHashException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'VK\\Exceptions\\VKApiException' not found in wp-content/plugins/import-vk-comments/vendor/vkcom/vk-php-sdk/src/VK/Exceptions/Api/VKApiParamUserIdException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'VK\\Exceptions\\VKApiException' not found in wp-content/plugins/import-vk-comments/vendor/vkcom/vk-php-sdk/src/VK/Exceptions/Api/VKApiMessagesChatUserNotInChatException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'VK\\Exceptions\\VKApiException' not found in wp-content/plugins/import-vk-comments/vendor/vkcom/vk-php-sdk/src/VK/Exceptions/Api/VKApiStoryExpiredException.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: import, export, widget, vkontakte, vk...

import-vk-comments/import-vk-comments.php Passed 13 tests

The main PHP script in "Import Vk Comments" version 1.0.0 is automatically included on every request by WordPress
122 characters long description:
Плагин импортирует комментарии из виджета комментариев ВК в WordPress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected8,430 lines of code in 356 files:
LanguageFilesBlank linesComment linesLines of code
PHP3473,29212,4477,214
JavaScript31931882
Markdown1900232
JSON20067
CSS20823
XML10012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity1.84
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity1.34
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces19
Interfaces1
Traits0
Classes337
▷ Abstract classes20.59%
▷ Concrete classes33599.41%
▷ Final classes00.00%
Methods826
▷ Static methods60.73%
▷ Public methods80597.46%
▷ Protected methods121.45%
▷ Private methods91.09%
Functions5
▷ Named functions480.00%
▷ Anonymous functions120.00%
Constants1,683
▷ Global constants10.06%
▷ Class constants1,68299.94%
▷ Public constants1,58494.17%

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