84% vk-link-target-controller

Code Review | VK Link Target Controller

WordPress plugin VK Link Target Controller scored84%from 54 tests.

About plugin

  • Plugin page: vk-link-target-co...
  • Plugin version: 1.7.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.0.2
  • WordPress version: 6.3.1
  • First release: Jan 8, 2015
  • Latest release: Sep 5, 2022
  • Number of updates: 36
  • Update frequency: every 85.9 days
  • Top authors: vektor-inc (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20,000+ active /132,618 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.04ms] Passed 4 tests

Analyzing server-side resources used by VK Link Target Controller
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.91 ▼5.92
Dashboard /wp-admin3.35 ▲0.04198.57 ▲145.76
Posts /wp-admin/edit.php3.45 ▲0.0949.28 ▼4.17
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.20 ▼11.14
Media Library /wp-admin/upload.php3.26 ▲0.0336.85 ▲1.06
Link Target Controller /wp-admin/options-general.php?page=vk-ltc3.2332.99

Server storage [IO: ▲2.06MB] [DB: ▲0.31MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for VK Link Target Controller
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,937 ▲15113.58 ▼0.989.35 ▲7.2846.11 ▲2.45
Dashboard /wp-admin2,247 ▲675.76 ▲0.1290.71 ▼7.4978.70 ▲32.24
Posts /wp-admin/edit.php2,112 ▲122.02 ▲0.0341.73 ▲2.6533.17 ▼1.75
Add New Post /wp-admin/post-new.php6,258 ▲4,71318.72 ▼4.47887.81 ▲203.5162.14 ▲4.24
Media Library /wp-admin/upload.php1,412 ▲154.33 ▲0.11108.70 ▲7.7047.58 ▲0.99
Link Target Controller /wp-admin/options-general.php?page=vk-ltc8582.0928.6526.57

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vk-link-target-controller/inc/vk-admin/package/class-vk-admin.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vk-link-target-controller/inc/vk-admin/package/class-vk-admin.php:22
    • > PHP Warning
      require_once(wp-content/plugins/vk-link-target-controller/vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/vk-link-target-controller/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/vk-link-target-controller/tests/test-sample.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/vk-link-target-controller/vk-link-target-controller.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/vk-link-target-controller/tests/test-option.php:11
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/vk-link-target-controller/vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/vk-link-target-controller/tests/bootstrap.php on line 3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
You can look at the official readme.txt

vk-link-target-controller/vk-link-target-controller.php 92% from 13 tests

"VK Link Target Controller" version 1.7.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 142 characters long)

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
Good job! No executable or dangerous file extensions detected8,813 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
JSON4007,264
PHP6186374749
Sass11053500
Bourne Shell121799
JavaScript4103277
PO File1121752
Markdown129042
XML22022
Ruby1027
CSS1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity22.50
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity3.21
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods39
▷ Static methods1641.03%
▷ Public methods39100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
7 PNG files occupy 0.19MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/vk-admin/package/images/vektor_logo.png6.44KB4.14KB▼ 35.70%
img/336_280_ExUnit.png51.14KB24.95KB▼ 51.21%
inc/vk-admin/package/images/vektor_logo-2020.png6.48KB5.37KB▼ 17.11%
inc/vk-admin/package/images/billvektor_banner.png33.56KB14.06KB▼ 58.09%
inc/vk-admin/package/images/ExUnit_bnr.png51.14KB24.95KB▼ 51.21%