78% vk-image

Code Review | VK Image

WordPress plugin VK Image scored78%from 54 tests.

About plugin

  • Plugin page: vk-image
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.7-3.5.2
  • WordPress version: 6.3.1
  • First release: Jun 23, 2013
  • Latest release: Jun 23, 2013
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: ajayver (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,567 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼2.32ms] Passed 4 tests

A check of server-side resources used by VK Image
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.65 ▼2.20
Dashboard /wp-admin3.32 ▲0.0144.51 ▼2.79
Posts /wp-admin/edit.php3.37 ▲0.0145.83 ▲0.20
Add New Post /wp-admin/post-new.php5.90 ▲0.0182.52 ▼4.49
Media Library /wp-admin/upload.php3.24 ▲0.0136.80 ▲0.90
VK Image /wp-admin/options-general.php?page=vk_image3.1828.57

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

VK Image: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▼0.431.64 ▼0.1042.48 ▲1.06
Dashboard /wp-admin2,196 ▲195.64 ▲0.0691.40 ▲5.2139.68 ▲3.06
Posts /wp-admin/edit.php2,107 ▲72.01 ▲0.0135.36 ▼0.9130.41 ▼11.01
Add New Post /wp-admin/post-new.php1,538 ▲218.10 ▼7.21628.02 ▼10.1769.64 ▼14.78
Media Library /wp-admin/upload.php1,401 ▼24.20 ▼0.0298.51 ▼4.3741.22 ▼6.13
VK Image /wp-admin/options-general.php?page=vk_image7932.0024.6427.46

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_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=vk_image
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=vk_image
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% 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
The following issues need your attention
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vk-image/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/vk-image/vk-image.php:11

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, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === vk-image === )
You can look at the official readme.txt

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

The main PHP script in "VK Image" version 1.1 is automatically included on every request by WordPress
68 characters long description:
Forces vk.com to use the first image from post while sharing a link.

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
No dangerous file extensions were detected44 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2151144

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin