56% team-vcard-generator

Code Review | Team VCard generator

WordPress plugin Team VCard generator scored56%from 54 tests.

About plugin

  • Plugin page: team-vcard-generator
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.2
  • WordPress version: 6.3.1
  • First release: Apr 28, 2016
  • Latest release: Jun 6, 2016
  • Number of updates: 68
  • Update frequency: every 0.6 days
  • Top authors: bluminson (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active /4,360 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▼11.32ms] Passed 4 tests

Server-side resources used by Team VCard generator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.95 ▲0.4946.68 ▲2.70
Dashboard /wp-admin3.71 ▲0.4038.38 ▼17.06
Posts /wp-admin/edit.php3.77 ▲0.4146.44 ▼6.40
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.82 ▼24.52
Media Library /wp-admin/upload.php3.68 ▲0.4539.91 ▲4.55
Add new /wp-admin/admin.php?page=new_team_member3.7343.39
Company /wp-admin/admin.php?page=company_team_member3.7749.63
Edit /wp-admin/admin.php?page=edit_team_member3.7339.61
Team members /wp-admin/admin.php?page=manage_team_member3.7750.59
Settings /wp-admin/admin.php?page=settings_team_member3.7337.70

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 646 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
bscs_settings
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Team VCard generator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,973 ▲20215.59 ▲1.211.28 ▼0.7346.41 ▲2.38
Dashboard /wp-admin2,392 ▲2046.49 ▲1.58139.81 ▲32.5338.64 ▼0.71
Posts /wp-admin/edit.php2,301 ▲2093.81 ▲1.7961.45 ▲18.1632.98 ▼5.60
Add New Post /wp-admin/post-new.php1,552 ▲3323.57 ▲0.36644.85 ▼15.1738.64 ▼16.03
Media Library /wp-admin/upload.php1,437 ▲465.28 ▲1.0492.81 ▼6.3345.77 ▲0.59
Add new /wp-admin/admin.php?page=new_team_member2,8644.7779.3570.29
Company /wp-admin/admin.php?page=company_team_member2,5264.6471.0168.37
Edit /wp-admin/admin.php?page=edit_team_member2,8954.6594.1742.80
Team members /wp-admin/admin.php?page=manage_team_member1,2943.8556.4331.23
Settings /wp-admin/admin.php?page=settings_team_member1,2313.9165.1673.79

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 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=new_team_member
    • > Notice in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+505
    Undefined index: bscs_calle
    • > GET request to /wp-admin/admin.php?page=new_team_member
    • > Notice in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+507
    Undefined index: bscs_numero
    • > GET request to /wp-admin/admin.php?page=new_team_member
    • > Notice in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+509
    Undefined index: bscs_ciudad
    • > GET request to /wp-admin/admin.php?page=new_team_member
    • > Notice in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+511
    Undefined index: bscs_provincia
    • > GET request to /wp-admin/admin.php?page=new_team_member
    • > Notice in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+513
    Undefined index: bscs_zip
    • > GET request to /wp-admin/admin.php?page=new_team_member
    • > Warning in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+521
    Use of undefined constant bscs_nota - assumed 'bscs_nota' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/admin.php?page=new_team_member
    • > Notice in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+521
    Undefined index: bscs_nota
    • > GET request to /wp-admin/admin.php?page=edit_team_member
    • > Notice in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+629
    Undefined index: member
    • > GET request to /wp-admin/admin.php?page=edit_team_member
    • > Notice in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+632
    Undefined index: firstname
  • 47 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_team_member
    • > Notice in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+1049
    Trying to access array offset on value of type null
  • 14 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_team_member
    • > Warning in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+1044
    in_array() expects parameter 2 to be array, null given
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_team_member
    • > Warning in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+1049
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/admin.php?page=settings_team_member
    • > Notice in wp-content/plugins/team-vcard-generator/includes/class-team-vcard-generator-loader.php+1584
    Undefined index: url_viejo

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/team-vcard-generator/admin/partials/team-vcard-generator-admin-display.php
    • > /wp-content/plugins/team-vcard-generator/public/partials/team-vcard-generator-public-display.php
    • > /wp-content/plugins/team-vcard-generator/includes/phpqrcode/index.php
    • > /wp-content/plugins/team-vcard-generator/includes/VCard.php
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_ID() in wp-content/plugins/team-vcard-generator/includes/single-team_member.php:4
    • > PHP Notice
      Undefined index: address_calle in wp-content/plugins/team-vcard-generator/includes/VCard.php on line 1251
    • > PHP Notice
      Undefined index: telefono_otro in wp-content/plugins/team-vcard-generator/includes/VCard.php on line 1249
    • > PHP Notice
      Undefined index: mail_personal in wp-content/plugins/team-vcard-generator/includes/VCard.php on line 1241
    • > PHP Notice
      Undefined index: telefono_profesional in wp-content/plugins/team-vcard-generator/includes/VCard.php on line 1245
    • > PHP Notice
      Undefined index: firstname in wp-content/plugins/team-vcard-generator/includes/VCard.php on line 1220
    • > PHP Notice
      Undefined index: mail_otro in wp-content/plugins/team-vcard-generator/includes/VCard.php on line 1243
    • > PHP Notice
      Undefined index: photo in wp-content/plugins/team-vcard-generator/includes/VCard.php on line 1257
    • > PHP Notice
      Undefined index: empresa in wp-content/plugins/team-vcard-generator/includes/VCard.php on line 1235
    • > PHP Notice
      Undefined index: cargo in wp-content/plugins/team-vcard-generator/includes/VCard.php on line 1237

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=settings_team_member
    • > Javascript (severe) in unknown
    /wp-content/plugins/team-vcard-generator/admin/js/bootstrap.min.js?ver=1.0.0 5:215 Uncaught Error: Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_team_member
    • > Network (severe)
    wp-content/plugins/team-vcard-generator/admin/css/images/ui-bg_flat_75_ffffff_40x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_team_member
    • > Network (severe)
    wp-content/plugins/team-vcard-generator/admin/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_team_member
    • > Network (severe)
    wp-content/plugins/team-vcard-generator/admin/css/images/ui-bg_glass_65_ffffff_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=edit_team_member
    • > Network (severe)
    wp-content/plugins/team-vcard-generator/admin/css/images/ui-bg_glass_75_e6e6e6_1x400.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=edit_team_member
    • > Network (severe)
    wp-content/plugins/team-vcard-generator/includes/vcf/-.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === team-vcard-generator === )
The official readme.txt is a good inspiration

team-vcard-generator/team-vcard-generator.php 92% from 13 tests

The main file in "Team VCard generator" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 227 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Almost there! Just fix the following issues
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/team-vcard-generator/includes/phpqrcode/tools/merge.bat
20,064 lines of code in 95 files:
LanguageFilesBlank linesComment linesLines of code
PHP361,9423,3369,886
CSS15932085,113
Sass1434341,648
LESS1434441,638
SVG300979
JavaScript101347435
PO File1249543361
Bourne Shell1002
DOS Batch1002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity30.62
▷ Minimum class complexity1.00
▷ Maximum class complexity292.00
Average method complexity3.84
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes47
▷ Abstract classes12.13%
▷ Concrete classes4697.87%
▷ Final classes00.00%
Methods492
▷ Static methods15230.89%
▷ Public methods37676.42%
▷ Protected methods9920.12%
▷ Private methods173.46%
Functions10
▷ Named functions990.00%
▷ Anonymous functions110.00%
Constants99
▷ Global constants99100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
149 compressed PNG files occupy 0.22MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/phpqrcode/cache/frame_19.png0.22KB0.21KB▼ 4.89%
public/css/jquery-mobile/images/icons-png/clock-white.png0.31KB0.37KB0.00%
public/css/jquery-mobile/images/icons-png/lock-black.png0.20KB0.24KB0.00%
public/css/jquery-mobile/images/icons-png/heart-white.png0.24KB0.29KB0.00%
assets/twitter_copy.png5.86KB3.80KB▼ 35.16%