84% face-authentication-login

Code Review | WP Face Login - Face Authentication For WordPress

WordPress plugin WP Face Login - Face Authentication For WordPress scored84%from 54 tests.

About plugin

  • Plugin page: face-authenticati...
  • Plugin version: 0.0.5
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.4
  • WordPress version: 6.3.1
  • First release: Oct 6, 2019
  • Latest release: Nov 8, 2019
  • Number of updates: 7
  • Update frequency: every 5.2 days
  • Top authors: bc2018 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

1,000+ active /2,028 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.67MB] [CPU: ▼1.16ms] Passed 4 tests

Server-side resources used by WP Face Login - Face Authentication For WordPress
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.14 ▲0.6846.55 ▼1.66
Dashboard /wp-admin3.98 ▲0.6852.39 ▲1.53
Posts /wp-admin/edit.php4.03 ▲0.6752.95 ▲0.14
Add New Post /wp-admin/post-new.php6.56 ▲0.6789.27 ▼4.65
Media Library /wp-admin/upload.php3.90 ▲0.6744.55 ▲6.37

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 271 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Face Login - Face Authentication For WordPress: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲6414.72 ▲0.171.60 ▼0.2644.26 ▲0.68
Dashboard /wp-admin2,234 ▲535.57 ▼0.0386.05 ▼19.7540.50 ▲0.56
Posts /wp-admin/edit.php2,136 ▲362.02 ▲0.0336.33 ▼5.7235.82 ▼3.22
Add New Post /wp-admin/post-new.php1,559 ▲3322.94 ▲0.01612.72 ▼81.2454.39 ▲3.39
Media Library /wp-admin/upload.php1,436 ▲364.25 ▲0.0895.78 ▼13.0142.10 ▼7.20

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Please fix the following
  • 138× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Formatter\ormalizerFormatter' not found in wp-content/plugins/face-authentication-login/vendor/monolog/monolog/src/Monolog/Formatter/LineFormatter.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\BadResponseException' not found in wp-content/plugins/face-authentication-login/vendor/guzzlehttp/guzzle/src/Exception/ClientException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/face-authentication-login/vendor/guzzlehttp/promises/src/CancellationException.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\TaskQueueInterface' not found in wp-content/plugins/face-authentication-login/vendor/guzzlehttp/promises/src/TaskQueue.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/face-authentication-login/vendor/guzzlehttp/psr7/src/AppendStream.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractProcessingHandler' not found in wp-content/plugins/face-authentication-login/vendor/monolog/monolog/src/Monolog/Handler/AmqpHandler.php:20
    • > PHP Fatal error
      require_once(): Failed opening required 'wp-content/plugins/face-authentication-login/vendor/phpgangsta/googleauthenticator/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/face-authentication-login/vendor/phpgangsta/googleauthenticator/tests/bootstrap.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/face-authentication-login/vendor/monolog/monolog/src/Monolog/Handler/FilterHandler.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UriInterface' not found in wp-content/plugins/face-authentication-login/vendor/guzzlehttp/psr7/src/Uri.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Formatter\\FormatterInterface' not found in wp-content/plugins/face-authentication-login/vendor/monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

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
2 plugin tags: authentication, login

face-authentication-login/Initiator.php 85% from 13 tests

This is the main PHP file of "WP Face Login - Face Authentication For WordPress" version 0.0.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • 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
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("face-authentication-login.php" instead of "Initiator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin64,566 lines of code in 255 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript911,9631,71231,633
PHP2244,35110,48017,154
CSS22363,17512,005
Markdown161,17703,732
XML12013
SVG10012
make1409
YAML1308

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity10.54
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces20
Interfaces23
Traits6
Classes183
▷ Abstract classes73.83%
▷ Concrete classes17696.17%
▷ Final classes84.55%
Methods1,451
▷ Static methods15810.89%
▷ Public methods1,11276.64%
▷ Protected methods15210.48%
▷ Private methods18712.89%
Functions161
▷ Named functions5634.78%
▷ Anonymous functions10565.22%
Constants145
▷ Global constants21.38%
▷ Class constants14398.62%
▷ Public constants143100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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