84% keyy

Code Review | Keyy Two Factor Authentication (like Clef)

WordPress plugin Keyy Two Factor Authentication (like Clef) scored84%from 54 tests.

About plugin

  • Plugin page: keyy
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.3.1
  • WordPress version: 6.3.1
  • First release: Jun 1, 2017
  • Latest release: Sep 10, 2023
  • Number of updates: 54
  • Update frequency: every 42.9 days
  • Top authors: DavidAnderson (74.07%)ankurchauhan126 (25.93%)nexist (3.7%)

Code review

54 tests

User reviews

46 reviews

Install metrics

500+ active /37,957 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.34MB] [CPU: ▼16.88ms] Passed 4 tests

An overview of server-side resources used by Keyy Two Factor Authentication (like Clef)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.3741.09 ▼2.41
Dashboard /wp-admin3.73 ▲0.3453.76 ▼12.88
Posts /wp-admin/edit.php3.78 ▲0.3851.79 ▲4.08
Add New Post /wp-admin/post-new.php3.54 ▼2.3940.93 ▼54.06
Media Library /wp-admin/upload.php3.59 ▲0.3238.19 ▲1.84

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 97 new files
Database: no new tables, 7 new options
New WordPress options
keyy_ltoken_c6ac_exp
db_upgraded
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Keyy Two Factor Authentication (like Clef): an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲16714.36 ▼0.371.84 ▼0.2635.25 ▼8.25
Dashboard /wp-admin2,206 ▲355.52 ▼0.1485.02 ▼16.9181.40 ▲39.68
Posts /wp-admin/edit.php2,120 ▲201.99 ▼0.0240.83 ▲7.0032.87 ▼1.02
Add New Post /wp-admin/post-new.php1,558 ▲3223.05 ▼0.62662.26 ▼46.1567.00 ▲15.64
Media Library /wp-admin/upload.php1,417 ▲174.21 ▲0.0698.59 ▼2.5170.31 ▲23.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
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • keyy_ltoken_c6ac_exp
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 17× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/keyy/includes/keyy-notices.php
    • > /wp-content/plugins/keyy/includes/login.php
    • > /wp-content/plugins/keyy/keyy.php
    • > /wp-content/plugins/keyy/templates/dashboard-header.php
    • > /wp-content/plugins/keyy/testing/test.php
    • > /wp-content/plugins/keyy/includes/class-commands.php
    • > /wp-content/plugins/keyy/includes/keyy-options.php
    • > /wp-content/plugins/keyy/includes/translations.php
    • > /wp-content/plugins/keyy/templates/login-form-learn-more.php
    • > /wp-content/plugins/keyy/includes/rest.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: two factor auth, 2fa, authenticate, password, two factor...

keyy/keyy.php Passed 13 tests

The entry point to "Keyy Two Factor Authentication (like Clef)" version 1.2.1 is a PHP file that has certain tags in its header comment area
28 characters long description:
Easy-to-use WordPress logins

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin24,720 lines of code in 75 files:
LanguageFilesBlank linesComment linesLines of code
PHP504,46113,81823,106
JavaScript13249229937
CSS69815400
JSON200184
Markdown233061
YAML12025
SVG1007

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
These items need your attention
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 107)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity121.91
▷ Minimum class complexity1.00
▷ Maximum class complexity655.00
Average method complexity6.17
▷ Minimum method complexity1.00
▷ Maximum method complexity107.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes34
▷ Abstract classes12.94%
▷ Concrete classes3397.06%
▷ Final classes00.00%
Methods792
▷ Static methods111.39%
▷ Public methods76896.97%
▷ Protected methods141.77%
▷ Private methods101.26%
Functions10
▷ Named functions880.00%
▷ Anonymous functions220.00%
Constants254
▷ Global constants23994.09%
▷ Class constants155.91%
▷ Public constants15100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.06MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/play-store-button.png12.24KB5.86KB▼ 52.10%
images/notices/black_friday.png5.06KB5.34KB0.00%
images/notices/christmas.png10.08KB10.46KB0.00%
images/admin_icon_16x16.png3.74KB0.98KB▼ 73.75%
images/notices/summer.png2.70KB2.93KB0.00%