78% staff-list-vcard

Code Review | Staff List vCard

WordPress plugin Staff List vCard scored78%from 54 tests.

About plugin

  • Plugin page: staff-list-vcard
  • Plugin version: 0.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Jan 30, 2021
  • Latest release: Oct 5, 2023
  • Number of updates: 53
  • Update frequency: every 18.6 days
  • Top authors: abcfolio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,257 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼7.90ms] Passed 4 tests

A check of server-side resources used by Staff List vCard
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0541.23 ▼1.08
Dashboard /wp-admin3.37 ▲0.0250.02 ▼19.54
Posts /wp-admin/edit.php3.48 ▲0.1247.80 ▲0.03
Add New Post /wp-admin/post-new.php5.97 ▲0.0887.67 ▼11.00
Media Library /wp-admin/upload.php3.29 ▲0.0638.60 ▲4.95
vCards /wp-admin/edit.php?post_type=cpt_staff_lst_vcard3.3335.58
Add New /wp-admin/post-new.php?post_type=cpt_staff_lst_vcard3.3044.07
QR Code /wp-admin/edit.php?post_type=cpt_staff_lst_qrcode3.3337.56
Admin /wp-admin/edit.php?post_type=cpt_staff_lst_vcard&page=abcfvc-admin-tabs3.2333.07

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 171 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
recovery_mode_email_last_sent
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Staff List vCard
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲10213.15 ▼1.071.84 ▲0.0346.52 ▲3.05
Dashboard /wp-admin2,248 ▲604.91 ▼0.96109.42 ▼11.8142.97 ▼4.53
Posts /wp-admin/edit.php2,134 ▲452.06 ▲0.0036.23 ▲0.0733.06 ▼0.56
Add New Post /wp-admin/post-new.php1,550 ▲2123.29 ▲4.88663.81 ▲21.5456.68 ▲0.43
Media Library /wp-admin/upload.php1,424 ▲454.26 ▲0.05104.42 ▼2.3745.30 ▼3.20
vCards /wp-admin/edit.php?post_type=cpt_staff_lst_vcard1,0951.9931.3833.76
Add New /wp-admin/post-new.php?post_type=cpt_staff_lst_vcard1,2181.538.3928.05
QR Code /wp-admin/edit.php?post_type=cpt_staff_lst_qrcode1,0951.9830.6230.85
Admin /wp-admin/edit.php?post_type=cpt_staff_lst_vcard&page=abcfvc-admin-tabs7141.536.5616.87

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
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • recovery_mode_email_last_sent
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=cpt_staff_lst_vcard&page=abcfvc-admin-tabs
    • > Error in wp-content/plugins/staff-list-vcard/admin/admin-tabs.php+19
    Uncaught Error: Call to undefined function abcfl_html_a_tag() in wp-content/plugins/staff-list-vcard/admin/admin-tabs.php:19
    Stack trace:
    #0 wp-content/plugins/staff-list-vcard/admin/class-menu.php(28): abcfvc_admin_tabs()
    #1 wp-includes/class-wp-hook.php(310): ABCFVC_Admin_Menu->load_page()
    #2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(517): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 wp-admin/edit.php(10): require_once('/var/www/wordpr...')
    #6 {main}
    thrown

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 67× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Endroid\\QrCode\\RoundBlockSizeMode\\RoundBlockSizeModeInterface' not found in wp-content/plugins/staff-list-vcard/vendor/Endroid/QrCode/RoundBlockSizeMode/RoundBlockSizeModeMargin.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'BaconQrCode\\Renderer\\RendererInterface' not found in wp-content/plugins/staff-list-vcard/vendor/BaconQrCode/Renderer/ImageRenderer.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'BaconQrCode\\Renderer\\Color\\ColorInterface' not found in wp-content/plugins/staff-list-vcard/vendor/BaconQrCode/Renderer/Color/Cmyk.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'DASPRiD\\Enum\\Exception\\ExceptionInterface' not found in wp-content/plugins/staff-list-vcard/vendor/DASPRiD/Enum/Exception/ExpectationException.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Endroid\\QrCode\\Writer\\WriterInterface' not found in wp-content/plugins/staff-list-vcard/vendor/Endroid/QrCode/Writer/PngWriter.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'BaconQrCode\\Renderer\\Eye\\EyeInterface' not found in wp-content/plugins/staff-list-vcard/vendor/BaconQrCode/Renderer/Eye/SquareEye.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Endroid\\QrCode\\Writer\\Result\\AbstractResult' not found in wp-content/plugins/staff-list-vcard/vendor/Endroid/QrCode/Writer/Result/BinaryResult.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Endroid\\QrCode\\Label\\LabelInterface' not found in wp-content/plugins/staff-list-vcard/vendor/Endroid/QrCode/Label/Label.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Endroid\\QrCode\\Label\\Alignment\\LabelAlignmentInterface' not found in wp-content/plugins/staff-list-vcard/vendor/Endroid/QrCode/Label/Alignment/LabelAlignmentCenter.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Endroid\\QrCode\\Writer\\Result\\AbstractResult' not found in wp-content/plugins/staff-list-vcard/vendor/Endroid/QrCode/Writer/Result/DebugResult.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: abcfolio, qrcode, vcard, qr code, vcf...

staff-list-vcard/staff-list-vcard.php 92% from 13 tests

The entry point to "Staff List vCard" version 0.3.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected10,735 lines of code in 162 files:
LanguageFilesBlank linesComment linesLines of code
PHP1602,7922,40510,521
CSS1336156
JavaScript1141558

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity8.37
▷ Minimum class complexity1.00
▷ Maximum class complexity112.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces29
Interfaces26
Traits0
Classes104
▷ Abstract classes21.92%
▷ Concrete classes10298.08%
▷ Final classes9189.22%
Methods696
▷ Static methods9113.07%
▷ Public methods54077.59%
▷ Protected methods71.01%
▷ Private methods14921.41%
Functions117
▷ Named functions10892.31%
▷ Anonymous functions97.69%
Constants83
▷ Global constants56.02%
▷ Class constants7893.98%
▷ Public constants1215.38%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/help.png0.45KB0.31KB▼ 31.66%