80% contact-form-vcard-generator

Code Review | Contact Form vCard Generator

WordPress plugin Contact Form vCard Generator scored80%from 54 tests.

About plugin

  • Plugin page: contact-form-vcar...
  • Plugin version: 2.1
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.1.1
  • WordPress version: 6.3.1
  • First release: Jul 6, 2018
  • Latest release: Jan 12, 2023
  • Number of updates: 12
  • Update frequency: every 137.6 days
  • Top authors: ashishajani (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /4,773 total downloads

Benchmarks

Plugin footprint 65% 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.02MB] [CPU: ▼6.05ms] 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.49 ▲0.0234.63 ▼5.59
Dashboard /wp-admin3.32 ▲0.0246.06 ▼0.56
Posts /wp-admin/edit.php3.37 ▲0.0244.25 ▼5.37
Add New Post /wp-admin/post-new.php5.90 ▲0.0282.28 ▼12.66
Media Library /wp-admin/upload.php3.25 ▲0.0235.61 ▲4.95

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

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

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 /2,808 ▲4714.25 ▼0.301.60 ▼0.1439.47 ▼0.17
Dashboard /wp-admin2,211 ▲345.57 ▼0.0089.57 ▲1.8172.51 ▲27.32
Posts /wp-admin/edit.php2,125 ▲251.96 ▲0.0136.22 ▲0.3131.77 ▼5.93
Add New Post /wp-admin/post-new.php1,543 ▲1523.65 ▲0.42749.98 ▲67.4358.69 ▼1.40
Media Library /wp-admin/upload.php1,407 ▲74.20 ▼0.01101.37 ▼3.5181.80 ▲37.51

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 50% 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
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

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: contact form vcard generator, vcard wordpress plugin, wordpress vcard generator, contact form vcard, wordpress 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 2.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,921 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP71712521,762
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.52
Average class complexity53.00
▷ Minimum class complexity4.00
▷ Maximum class complexity92.00
Average method complexity7.78
▷ Minimum method complexity1.00
▷ Maximum method complexity54.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%
Functions30
▷ Named functions30100.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%