82% wp-viber-contact-button-lite

Code Review | VContact Button

WordPress plugin VContact Button scored 82% from 54 tests.

About plugin

  • Plugin page: wp-viber-contact-...
  • Plugin version: 2.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.9
  • WordPress version: 5.9.2
  • First release: Oct 17, 2017
  • Latest release: Feb 15, 2022
  • Number of updates: 31
  • Update frequency: every 51.1 days
  • Top authors: Access Keys (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 6,124 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

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

A check of server-side resources used by VContact Button
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.09125.22 ▲66.12
Dashboard /wp-admin3.44 ▲0.0335.05 ▲2.77
Posts /wp-admin/edit.php3.66 ▲0.0341.85 ▲4.81
Add New Post /wp-admin/post-new.php6.97 ▼0.0099.15 ▼1,175.75
Media Library /wp-admin/upload.php3.38 ▲0.0928.56 ▲4.32
Check Premium Version /wp-admin/admin.php?page=wpvcbL-premium3.1217.06
Documentation /wp-admin/admin.php?page=wpvcbL-documentation3.1224.81
VContact Button /wp-admin/admin.php?page=wp-viber-contact-button-lite3.3836.83

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 58 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by VContact Button
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,804 ▲5015.87 ▲0.645.84 ▲0.202.26 ▼0.59
Dashboard /wp-admin2,927 ▲736.08 ▼0.07119.19 ▼17.75185.55 ▼37.71
Posts /wp-admin/edit.php2,728 ▲373.26 ▲0.0263.27 ▼0.50134.17 ▼8.61
Add New Post /wp-admin/post-new.php1,686 ▲4716.30 ▼6.06398.80 ▼54.27193.22 ▲28.72
Media Library /wp-admin/upload.php1,737 ▲395.53 ▲0.00150.67 ▲14.02195.70 ▼57.33
Check Premium Version /wp-admin/admin.php?page=wpvcbL-premium1,43711.33407.13228.17
Documentation /wp-admin/admin.php?page=wpvcbL-documentation1,2919.42300.45206.72
VContact Button /wp-admin/admin.php?page=wp-viber-contact-button-lite2,5719.53266.75137.63

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=wp-viber-contact-button-lite
    • > Notice in wp-content/plugins/wp-viber-contact-button-lite/inc/backend/wpvcbl-general-setting.php+118
    Trying to access array offset on value of type bool

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
Please fix the following items
  • 7× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-viber-contact-button-lite/inc/backend/wpvcbl-how-to-use.php
    • > /wp-content/plugins/wp-viber-contact-button-lite/inc/backend/wpvcbl-general-setting.php
    • > /wp-content/plugins/wp-viber-contact-button-lite/inc/backend/wpvcbl-about.php
    • > /wp-content/plugins/wp-viber-contact-button-lite/inc/frontend/wpvcbl_shortcode.php
    • > /wp-content/plugins/wp-viber-contact-button-lite/inc/backend/wpvcbl-setting.php
    • > /wp-content/plugins/wp-viber-contact-button-lite/inc/frontend/wpvcbl-mobile-detect.php
    • > /wp-content/plugins/wp-viber-contact-button-lite/wp-viber-contact-button-lite.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=wpvcbL-premium
    • > Javascript (severe) in unknown
    https://accesspressthemes.com/wordpress-plugins/wp-viber-contact-button/ - Access to script at 'https://embed.tawk.to/60cc2bbb65b7290ac63693ec/1f8eollms' from origin 'https://accesspressthemes.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wpvcbL-documentation
    • > Network (severe)
    https://embed.tawk.to/60cc2bbb65b7290ac63693ec/1f8eollms - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/admin.php?page=wpvcbL-premium
    • > Network (severe)
    https://accesspressthemes.com/wp-content/uploads/2017/11/screenshot4.png - Failed to load resource: the server responded with a status of 404 ()
    • > GET request to /wp-admin/admin.php?page=wpvcbL-documentation
    • > Javascript (severe) in unknown
    https://accesspressthemes.com/documentation/vcontact-button/ - Access to script at 'https://embed.tawk.to/60cc2bbb65b7290ac63693ec/1f8eollms' from origin 'https://accesspressthemes.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Please fix the following attributes: Please take inspiration from this readme.txt

wp-viber-contact-button-lite/wp-viber-contact-button-lite.php Passed 13 tests

The main PHP file in "VContact Button" ver. 2.0.6 adds more information about the plugin and also serves as the entry point for this plugin
72 characters long description:
VContact Button allows you to easily create chat via Viber in WordPress.

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
Success! There were no dangerous files found in this plugin9,498 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS644243,549
HTML220202,825
LESS2621,134
PHP71696561,122
SVG200760
JavaScript111487
Markdown111021

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.65
Average class complexity78.00
▷ Minimum class complexity22.00
▷ Maximum class complexity134.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods47
▷ Static methods919.15%
▷ Public methods4595.74%
▷ Protected methods24.26%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants25
▷ Global constants1664.00%
▷ Class constants936.00%
▷ Public constants9100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
11 PNG files occupy 1.25MB with 0.78MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/upgrade-to-pro/upgrade-to-pro-feature.png616.88KB31.82KB▼ 94.84%
images/plugin.png12.50KB5.31KB▼ 57.50%
images/theme.png52.01KB17.38KB▼ 66.59%
images/no-image-available.png14.23KB6.99KB▼ 50.89%
images/pinterest.png2.17KB1.25KB▼ 42.30%