10% vk-lock

Code Review | VK Lock

WordPress plugin VK Lock scored10%from 54 tests.

About plugin

  • Plugin page: vk-lock
  • Plugin version: 0.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8.1
  • WordPress version: 6.3.1
  • First release: Aug 19, 2017
  • Latest release: Aug 19, 2017
  • Number of updates: 7
  • Update frequency: every 0.1 days
  • Top authors: igrp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,134 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/vk-lock/VkLock_Plugin.php+40
    count(): Parameter must be an array or an object that implements Countable

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.10ms] Passed 4 tests

Server-side resources used by VK Lock
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.92 ▼5.67
Dashboard /wp-admin3.34 ▲0.0444.60 ▼9.20
Posts /wp-admin/edit.php3.45 ▲0.1046.33 ▼3.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0492.42 ▼9.55
Media Library /wp-admin/upload.php3.26 ▲0.0335.35 ▲0.49
VK Lock /wp-admin/plugins.php?page=VkLock_PluginSettings3.2331.65

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 17 new options
New WordPress options
can_compress_scripts
VkLock_Plugin_noAccessNoticeHeader
VkLock_Plugin_showDefaultPasswordForm
theysaidso_admin_options
VkLock_Plugin__installed
VkLock_Plugin__version
VkLock_Plugin_signinVKButtonText
db_upgraded
widget_theysaidso_widget
widget_recent-posts
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for VK Lock
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.29 ▼1.291.79 ▲0.1439.68 ▼5.70
Dashboard /wp-admin2,210 ▲195.96 ▲0.1199.28 ▼4.8640.22 ▼4.94
Posts /wp-admin/edit.php2,093 ▲72.00 ▼0.0540.10 ▲4.7636.14 ▲1.86
Add New Post /wp-admin/post-new.php6,264 ▲4,72621.41 ▼1.78844.24 ▲158.4476.60 ▲18.06
Media Library /wp-admin/upload.php1,386 ▲14.17 ▼0.0299.51 ▼9.6741.25 ▼4.82
VK Lock /wp-admin/plugins.php?page=VkLock_PluginSettings9782.0522.4030.35

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 17 options
    • VkLock_Plugin_signinVKButtonText
    • can_compress_scripts
    • VkLock_Plugin_noAccessTimelimit
    • VkLock_Plugin_siteApplicationID
    • widget_recent-comments
    • VkLock_Plugin__version
    • db_upgraded
    • VkLock_Plugin_cssClassButton
    • VkLock_Plugin_noAccessNoticeHeader
    • widget_recent-posts
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vk-lock/vk-lock.php:77

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2 in vk-lock/assets to your readme.txt
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

vk-lock/vk-lock.php Passed 13 tests

The entry point to "VK Lock" version 0.1.8 is a PHP file that has certain tags in its header comment area
69 characters long description:
Restrict page\post access to authorized VKontakte group members only.

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
Success! There were no dangerous files found in this plugin1,037 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP10326729922
PO File13940115

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity14.88
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.18
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes225.00%
▷ Concrete classes675.00%
▷ Final classes00.00%
Methods96
▷ Static methods00.00%
▷ Public methods6062.50%
▷ Protected methods3435.42%
▷ Private methods22.08%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants00.00%
▷ Class constants4100.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin