83% wp-qrcode-me-v-card

Code Review | QR code MeCard/vCard generator

WordPress plugin QR code MeCard/vCard generator scored83%from 54 tests.

About plugin

  • Plugin page: wp-qrcode-me-v-card
  • Plugin version: 1.6.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Dec 10, 2019
  • Latest release: Nov 15, 2023
  • Number of updates: 32
  • Update frequency: every 44.9 days
  • Top authors: stasionok (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

2,000+ active /22,948 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Server-side resources used by QR code MeCard/vCard generator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0334.99 ▼6.92
Dashboard /wp-admin3.36 ▲0.0149.28 ▼8.22
Posts /wp-admin/edit.php3.47 ▲0.1248.33 ▲4.52
Add New Post /wp-admin/post-new.php5.96 ▲0.0795.87 ▼62.75
Media Library /wp-admin/upload.php3.28 ▲0.0554.91 ▲22.77
All QR codes /wp-admin/edit.php?post_type=qrcode-card3.3332.94
Add New /wp-admin/post-new.php?post_type=qrcode-card3.6045.48

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 378 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_widget_wp-qrcode-me-v-card
theysaidso_admin_options

Browser metrics Passed 4 tests

QR code MeCard/vCard generator: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲12413.68 ▼0.601.74 ▲0.1036.90 ▼6.44
Dashboard /wp-admin2,236 ▲586.05 ▲0.3596.63 ▼18.3880.07 ▲36.05
Posts /wp-admin/edit.php2,164 ▲642.46 ▲0.5045.64 ▲7.7139.03 ▲7.81
Add New Post /wp-admin/post-new.php1,574 ▲3923.40 ▼1.69712.15 ▲14.3432.76 ▼36.79
Media Library /wp-admin/upload.php1,453 ▲564.68 ▲0.52106.28 ▲7.7171.47 ▲28.16
All QR codes /wp-admin/edit.php?post_type=qrcode-card1,1462.4137.3930.47
Add New /wp-admin/post-new.php?post_type=qrcode-card3,1284.94103.6779.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_widget_wp-qrcode-me-v-card
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 136× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\String\\AbstractUnicodeString' not found in wp-content/plugins/wp-qrcode-me-v-card/vendor/symfony/string/CodePointString.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' not found in wp-content/plugins/wp-qrcode-me-v-card/vendor/symfony/options-resolver/Exception/NoSuchOptionException.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\PropertyInfo\\PropertyTypeExtractorInterface' not found in wp-content/plugins/wp-qrcode-me-v-card/vendor/symfony/property-info/Extractor/PhpStanExtractor.php:33
    • > PHP Fatal error
      Uncaught Error: Interface 'BaconQrCode\\Renderer\\Module\\ModuleInterface' not found in wp-content/plugins/wp-qrcode-me-v-card/vendor/bacon/bacon-qr-code/src/Renderer/Module/SquareModule.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Zxing\\Common\\GridSampler' not found in wp-content/plugins/wp-qrcode-me-v-card/vendor/khanamiryan/qrcode-detector-decoder/lib/Common/DefaultGridSampler.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' not found in wp-content/plugins/wp-qrcode-me-v-card/vendor/symfony/options-resolver/Exception/InvalidOptionsException.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/wp-qrcode-me-v-card/vendor/dasprid/enum/test/AbstractEnumTest.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'DASPRiD\\Enum\\AbstractEnum' not found in wp-content/plugins/wp-qrcode-me-v-card/vendor/dasprid/enum/test/WeekDay.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\DependencyInjection\\Compiler\\CompilerPassInterface' not found in wp-content/plugins/wp-qrcode-me-v-card/vendor/symfony/property-info/DependencyInjection/PropertyInfoConstructorPass.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'BaconQrCode\\Renderer\\Image\\ImageBackEndInterface' not found in wp-content/plugins/wp-qrcode-me-v-card/vendor/bacon/bacon-qr-code/src/Renderer/Image/EpsImageBackEnd.php:21

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)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Donate link: Please fix this invalid url: "Ethereum 0x1b7722bd9899fD10D145D773F5373460E11f97A6"
The official readme.txt might help

wp-qrcode-me-v-card/bootstrap.php 85% from 13 tests

"QR code MeCard/vCard generator" version 1.6.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-qrcode-me-v-card.php" instead of "bootstrap.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 147 characters long)

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
Success! There were no dangerous files found in this plugin41,025 lines of code in 345 files:
LanguageFilesBlank linesComment linesLines of code
PHP2965,7268,94637,819
JSON17001,831
Markdown232480737
PO File1135163338
CSS1360166
XML45275
YAML211058
JavaScript10101

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity14.11
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity3.19
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces54
Interfaces32
Traits0
Classes237
▷ Abstract classes114.64%
▷ Concrete classes22695.36%
▷ Final classes12957.08%
Methods1,642
▷ Static methods30218.39%
▷ Public methods1,38384.23%
▷ Protected methods201.22%
▷ Private methods23914.56%
Functions190
▷ Named functions14877.89%
▷ Anonymous functions4222.11%
Constants275
▷ Global constants176.18%
▷ Class constants25893.82%
▷ Public constants14556.20%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/endroid/qr-code/assets/images/symfony.png15.90KB16.60KB0.00%
vendor/khanamiryan/qrcode-detector-decoder/tests/qrcodes/hello_world.png3.05KB0.24KB▼ 92.25%
static/images/qr-code-16-icon.png2.26KB0.46KB▼ 79.88%