10% value-auth-two-factor-and-access-control

Code Review | Value-Auth Two Factor and Access Control

WordPress plugin Value-Auth Two Factor and Access Control scored10%from 54 tests.

About plugin

  • Plugin page: value-auth-two-fa...
  • Plugin version: 2.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Jan 8, 2021
  • Latest release: Jun 17, 2022
  • Number of updates: 14
  • Update frequency: every 38.5 days
  • Top authors: gmodigirock (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /5,538 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/value-auth-two-factor-and-access-control/lib/ValueAuthSetting.php+68
    Undefined offset: 0

Server metrics [RAM: ▲0.37MB] [CPU: ▼3.98ms] Passed 4 tests

A check of server-side resources used by Value-Auth Two Factor and Access Control
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3738.79 ▼3.26
Dashboard /wp-admin3.68 ▲0.3752.19 ▼9.84
Posts /wp-admin/edit.php3.73 ▲0.3753.21 ▲5.70
Add New Post /wp-admin/post-new.php6.28 ▲0.3988.86 ▼2.45
Media Library /wp-admin/upload.php3.60 ▲0.3741.70 ▼0.38
ログインの管理 /wp-admin/admin.php?page=vauth_twofactor_admin3.5134.54
認証設定 /wp-admin/admin.php?page=vauth_setting3.5135.16
2段階認証 /wp-admin/admin.php?page=vauth_twofactor_setting3.5134.88

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 945 new files
Database: 2 new tables, 7 new options
New tables
wp_value_auth_users
wp_value_auth_settings
New WordPress options
can_compress_scripts
va_db_version
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Value-Auth Two Factor and Access Control
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,900 ▲12918.72 ▲4.3269.36 ▲67.2438.02 ▼8.27
Dashboard /wp-admin2,262 ▲747.42 ▲2.51188.90 ▲72.6848.32 ▲4.19
Posts /wp-admin/edit.php2,121 ▲324.47 ▲2.4658.71 ▲19.2734.82 ▲0.63
Add New Post /wp-admin/post-new.php1,553 ▲2520.63 ▼2.56514.16 ▼174.6626.57 ▼30.88
Media Library /wp-admin/upload.php1,444 ▲567.24 ▲3.03116.52 ▲11.0745.86 ▲1.10
ログインの管理 /wp-admin/admin.php?page=vauth_twofactor_admin7974.5146.2648.31
認証設定 /wp-admin/admin.php?page=vauth_setting8914.3647.4357.41
2段階認証 /wp-admin/admin.php?page=vauth_twofactor_setting8064.4045.8536.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/value-auth-two-factor-and-access-control/lib/elements/views/code_input.php
    • > /wp-content/plugins/value-auth-two-factor-and-access-control/lib/elements/views/management_console.php
    • > /wp-content/plugins/value-auth-two-factor-and-access-control/lib/elements/views/2fa_setting.php
  • 514× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ValueAuth\\ApiResult\\ApiResult' not found in wp-content/plugins/value-auth-two-factor-and-access-control/vendor/digirock/value-auth-php/src/ValueAuth/ApiResult/IpAddressRestrictionListResult.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'phpDocumentor\\Reflection\\DocBlock\\TagFactory' not found in wp-content/plugins/value-auth-two-factor-and-access-control/vendor/phpdocumentor/reflection-docblock/src/DocBlock/StandardTagFactory.php:38
    • > PHP Fatal error
      Uncaught Error: Class 'Tebru\\Gson\\TypeAdapter' not found in wp-content/plugins/value-auth-two-factor-and-access-control/vendor/tebru/gson-php/tests/Mock/TypeAdapterMock.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/value-auth-two-factor-and-access-control/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/value-auth-two-factor-and-access-control/vendor/guzzlehttp/psr7/src/BufferStream.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'phpDocumentor\\Reflection\\DocBlock\\Tags\\TagWithType' not found in wp-content/plugins/value-auth-two-factor-and-access-control/vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Return_.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\Cache\\Adapter\\AbstractAdapter' not found in wp-content/plugins/value-auth-two-factor-and-access-control/vendor/symfony/cache/Adapter/MemcachedAdapter.php:23
    • > PHP Fatal error
      Uncaught Error: Interface 'Tebru\\Gson\\Internal\\SetterStrategy' not found in wp-content/plugins/value-auth-two-factor-and-access-control/vendor/tebru/gson-php/src/Internal/AccessorStrategy/SetByClosure.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'ValueAuth\\ApiResult\\Model' not found in wp-content/plugins/value-auth-two-factor-and-access-control/vendor/digirock/value-auth-php/src/ValueAuth/ApiResult/CountryRestriction.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Tebru\\Gson\\TypeAdapterFactory' not found in wp-content/plugins/value-auth-two-factor-and-access-control/vendor/tebru/gson-php/src/TypeAdapter/Factory/WrappedTypeAdapterFactory.php:21

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=vauth_twofactor_setting
    • > Javascript (severe) in unknown
    /wp-content/plugins/value-auth-two-factor-and-access-control/lib/public/dist/js/managementConsole.js?ver=6.3.1 88428:59 Uncaught TypeError: Cannot read properties of null (reading 'getAttribute')

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: 2fa, login, wordpress sso, security, two factor auth

value-auth-two-factor-and-access-control/valueauth.php 85% from 13 tests

The principal PHP file in "Value-Auth Two Factor and Access Control" v. 2.0.5 is loaded by WordPress automatically on each request
The following require your attention:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("value-auth-two-factor-and-access-control.php" instead of "valueauth.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin176,065 lines of code in 899 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript227,60819,480127,842
PHP7909,68024,77138,696
Markdown491,81805,604
JSON31002,794
YAML12801492
reStructuredText4210329237
XML92112230
CSS14014161
make1409

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity6.79
▷ Minimum class complexity1.00
▷ Maximum class complexity224.00
Average method complexity2.36
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces111
Interfaces105
Traits18
Classes650
▷ Abstract classes243.69%
▷ Concrete classes62696.31%
▷ Final classes15124.12%
Methods3,357
▷ Static methods60017.87%
▷ Public methods2,91986.95%
▷ Protected methods1223.63%
▷ Private methods3169.41%
Functions257
▷ Named functions8432.68%
▷ Anonymous functions17367.32%
Constants240
▷ Global constants41.67%
▷ Class constants23698.33%
▷ Public constants19984.32%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin