84% wp-webauthn

Code Review | WP-WebAuthn

WordPress plugin WP-WebAuthn scored84%from 54 tests.

About plugin

  • Plugin page: wp-webauthn
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 24, 2020
  • Latest release: Aug 31, 2023
  • Number of updates: 50
  • Update frequency: every 25.1 days
  • Top authors: axton (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

1,000+ active /9,167 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

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

An overview of server-side resources used by WP-WebAuthn
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0534.96 ▲1.67
Dashboard /wp-admin3.35 ▲0.0444.30 ▼0.46
Posts /wp-admin/edit.php3.40 ▲0.0440.47 ▼11.45
Add New Post /wp-admin/post-new.php5.94 ▲0.0580.15 ▼9.65
Media Library /wp-admin/upload.php3.27 ▲0.0434.76 ▲0.30
WP-WebAuthn /wp-admin/options-general.php?page=wwa_admin3.4530.78

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 919 new files
Database: no new tables, 10 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
wwa_init
wwa_options
widget_recent-posts
theysaidso_admin_options
wwa_log
wwa_version
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

WP-WebAuthn: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,832 ▲6113.36 ▼1.391.96 ▼0.0240.77 ▼3.77
Dashboard /wp-admin2,207 ▲255.81 ▼0.0792.67 ▼10.8137.38 ▼7.52
Posts /wp-admin/edit.php2,093 ▲251.99 ▲0.0133.50 ▼7.9834.67 ▼4.83
Add New Post /wp-admin/post-new.php6,353 ▲4,81628.05 ▲4.95907.95 ▲312.5871.02 ▲21.56
Media Library /wp-admin/upload.php1,386 ▼54.20 ▼0.0296.54 ▼1.4040.30 ▼2.48
WP-WebAuthn /wp-admin/options-general.php?page=wwa_admin1,2161.7425.0542.60

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 10 options in the database
    • wwa_log
    • theysaidso_admin_options
    • wwa_options
    • wwa_version
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • wwa_init

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 445× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/wp-webauthn/wp-webauthn-vendor/nyholm/psr7/src/Uri.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Ramsey\\Uuid\\Uuid' not found in wp-content/plugins/wp-webauthn/wp-webauthn-vendor/ramsey/uuid/src/Rfc4122/UuidV3.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'CBOR\\OtherObject' not found in wp-content/plugins/wp-webauthn/wp-webauthn-vendor/spomky-labs/cbor-php/src/OtherObject/DoublePrecisionFloatObject.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_action() in wp-content/plugins/wp-webauthn/wwa-compatibility.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'Webauthn\\PublicKeyCredentialOptions' not found in wp-content/plugins/wp-webauthn/wp-webauthn-vendor/web-auth/webauthn-lib/src/PublicKeyCredentialCreationOptions.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Cose\\Algorithm\\Signature\\RSA\\RSA' not found in wp-content/plugins/wp-webauthn/wp-webauthn-vendor/web-auth/cose-lib/src/Algorithm/Signature/RSA/RS512.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'FG\\ASN1\\ASNObject' not found in wp-content/plugins/wp-webauthn/wp-webauthn-vendor/fgrosse/phpasn1/lib/X509/SAN/IPAddress.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'Safe\\Exceptions\\SafeExceptionInterface' not found in wp-content/plugins/wp-webauthn/wp-webauthn-vendor/thecodingmachine/safe/generated/Exceptions/FunchandException.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Process\\Process' not found in wp-content/plugins/wp-webauthn/wp-webauthn-vendor/symfony/process/PhpProcess.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Ramsey\\Uuid\\UuidInterface' not found in wp-content/plugins/wp-webauthn/wp-webauthn-vendor/ramsey/uuid/src/Uuid.php:43

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: authentication, fido, u2f, security, fido2...

wp-webauthn/wp-webauthn.php Passed 13 tests

Analyzing the main PHP file in "WP-WebAuthn" version 1.3.1
79 characters long description:
WP-WebAuthn allows you to safely login to your WordPress site without password.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin61,179 lines of code in 864 files:
LanguageFilesBlank linesComment linesLines of code
PHP77712,01050,51951,824
JSON35103,865
PO File55956552,018
Markdown3369901,568
JavaScript6671211,493
CSS300372
YAML4142531
XML1008

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity6.60
▷ Minimum class complexity1.00
▷ Maximum class complexity214.00
Average method complexity2.19
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces89
Interfaces92
Traits14
Classes559
▷ Abstract classes427.51%
▷ Concrete classes51792.49%
▷ Final classes15129.21%
Methods3,470
▷ Static methods75121.64%
▷ Public methods2,98686.05%
▷ Protected methods1414.06%
▷ Private methods3439.88%
Functions1,269
▷ Named functions1,20294.72%
▷ Anonymous functions675.28%
Constants693
▷ Global constants40.58%
▷ Class constants68999.42%
▷ Public constants58384.62%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin