84% button-contact-vr

Code Review | Button contact VR

WordPress plugin Button contact VR scored84%from 54 tests.

About plugin

  • Plugin page: button-contact-vr
  • Plugin version: 4.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Jun 27, 2020
  • Latest release: Oct 24, 2023
  • Number of updates: 30
  • Update frequency: every 40.5 days
  • Top authors: hautrancong16 (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

40,000+ active /125,308 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.11MB] [CPU: ▼5.41ms] Passed 4 tests

A check of server-side resources used by Button contact VR
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1046.50 ▲4.50
Dashboard /wp-admin3.44 ▲0.0949.91 ▼7.77
Posts /wp-admin/edit.php3.49 ▲0.1343.58 ▼3.22
Add New Post /wp-admin/post-new.php6.04 ▲0.1579.87 ▼14.57
Media Library /wp-admin/upload.php3.36 ▲0.1336.92 ▲3.92
Showroom /wp-admin/admin.php?page=contact_vr_showroom3.3534.68
Button contact /wp-admin/admin.php?page=contact_vr3.3436.19
Contact form /wp-admin/admin.php?page=contact_vr_contact_form3.3530.02
Setting /wp-admin/admin.php?page=contact_vr_setting3.3332.53
All in one /wp-admin/admin.php?page=contact_vr_all_in_one3.3432.34

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 33 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 Button contact VR
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲14514.69 ▲0.082.13 ▲0.4143.53 ▲0.11
Dashboard /wp-admin2,257 ▲805.76 ▲0.1496.84 ▲9.3584.08 ▲45.23
Posts /wp-admin/edit.php2,164 ▲642.31 ▲0.2936.11 ▲1.0034.16 ▲0.35
Add New Post /wp-admin/post-new.php1,576 ▲5023.24 ▼0.53700.31 ▼8.0436.00 ▼24.00
Media Library /wp-admin/upload.php1,462 ▲624.33 ▲0.15106.60 ▲10.9580.39 ▲36.01
Showroom /wp-admin/admin.php?page=contact_vr_showroom1,7309.98210.8452.36
Button contact /wp-admin/admin.php?page=contact_vr1,7252.9661.8829.39
Contact form /wp-admin/admin.php?page=contact_vr_contact_form1,3808.72250.4253.54
Setting /wp-admin/admin.php?page=contact_vr_setting1,0321.8726.1230.54
All in one /wp-admin/admin.php?page=contact_vr_all_in_one1,1462.5138.1933.38

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

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)
Even though no errors were found, this is by no means an exhaustive test

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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/button-contact-vr/inc/contact-form.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/button-contact-vr/inc/all-in-one.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/button-contact-vr/inc/admin.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/button-contact-vr/inc/setting.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/button-contact-vr/inc/showroom.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid URI: "paypal.me/virustran"
  • Screenshots: A description for screenshot #5 is required in button-contact-vr/assets to your readme.txt
Please take inspiration from this readme.txt

button-contact-vr/button-contact-vr.php Passed 13 tests

"Button contact VR" version 4.7's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
77 characters long description:
Button contact call, zalo, whatsapp, messenger, popup form, popup showroom...

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin1,345 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP887451,331
CSS20011
JavaScript1013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity58.00
▷ Minimum class complexity58.00
▷ Maximum class complexity58.00
Average method complexity10.50
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods6
▷ Static methods116.67%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
21 PNG files occupy 0.09MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/youtube.png1.95KB1.16KB▼ 40.58%
img/phone.png0.93KB0.37KB▼ 59.98%
img/viber.png13.13KB2.60KB▼ 80.18%
img/contact.png4.50KB1.92KB▼ 57.36%
img/zalo.png3.90KB0.38KB▼ 90.35%