90% contact-form-vcard-generator

Code Review | Contact Form vCard Generator

WordPress plugin Contact Form vCard Generator scored 90% from 54 tests.

About plugin

  • Plugin page: contact-form-vcar...
  • Plugin version: 1.1
  • PHP compatiblity: 5.5.9+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.2.1
  • WordPress version: 5.8.1
  • First release: Jul 6, 2018
  • Latest release: May 22, 2019
  • Number of updates: 10
  • Update frequency: every 32.0 days
  • Top authors: ashishajani (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active / 2,745 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.18MB] [CPU: ▼141.41ms] Passed 4 tests

An overview of server-side resources used by Contact Form vCard Generator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.00 ▲0.2834.58 ▲14.76
Dashboard /wp-admin3.22 ▲0.1746.28 ▲0.86
Posts /wp-admin/edit.php3.33 ▲0.2346.28 ▲1.58
Add New Post /wp-admin/post-new.php5.58 ▲0.1588.88 ▼565.67
Media Library /wp-admin/upload.php3.16 ▲0.1631.30 ▼2.39

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 13 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Contact Form vCard Generator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,702 ▲10615.91 ▼0.058.60 ▼0.8643.64 ▼0.34
Dashboard /wp-admin2,979 ▲456.03 ▼0.16140.66 ▼24.28147.07 ▲45.55
Posts /wp-admin/edit.php2,774 ▲352.69 ▼0.0063.79 ▼2.3387.35 ▲6.53
Add New Post /wp-admin/post-new.php1,517 ▼16618.25 ▼0.47372.27 ▼11.89104.10 ▲0.67
Media Library /wp-admin/upload.php1,768 ▼425.04 ▼0.02132.24 ▼35.89129.15 ▲20.26

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/contact-form-vcard-generator/uninstall.php+7
    Constant WP_GVCCF_CF_DETAILS_TABLE already defined

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: wordpress vcard generator, contact form vcard, vcard wordpress plugin, wordpress contact form vcard generator, contact form vcard generator

contact-form-vcard-generator/contact-form-vcard-generator.php Passed 13 tests

The entry point to "Contact Form vCard Generator" version 1.1 is a PHP file that has certain tags in its header comment area
65 characters long description:
WordPress plugin to generate vCard from Contact Form 7 inquiries.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected1,836 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP71462471,677
CSS18183
JavaScript18376

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.51
Average class complexity45.33
▷ Minimum class complexity4.00
▷ Maximum class complexity72.00
Average method complexity6.78
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants10
▷ Global constants10100.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
2 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/example-img.png24.97KB25.67KB0.00%
assets/images/vcard-icon.png1.25KB0.63KB▼ 49.96%