93% woo-yubikey

Code Review | yubikey-plugin

WordPress plugin yubikey-plugin scored 93% from 54 tests.

About plugin

  • Plugin page: woo-yubikey
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.3
  • WordPress version: 5.8.1
  • First release: Jun 27, 2017
  • Latest release: Feb 4, 2019
  • Number of updates: 14
  • Update frequency: every 41.9 days
  • Top authors: apb360 (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

600+ active / 3,550 total downloads

Benchmarks

Plugin footprint Passed 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.01MB] [CPU: ▼139.52ms] Passed 4 tests

A check of server-side resources used by yubikey-plugin
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1248.51 ▲24.34
Dashboard /wp-admin3.07 ▲0.0145.62 ▲2.74
Posts /wp-admin/edit.php3.12 ▲0.0144.88 ▲4.92
Add New Post /wp-admin/post-new.php5.43 ▲0.0090.42 ▼563.91
Media Library /wp-admin/upload.php3.01 ▲0.0131.08 ▼1.84
Yubikey /wp-admin/options-general.php?page=yubikey3.0128.92

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for yubikey-plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,711 ▲13115.86 ▲0.1712.51 ▲0.5050.50 ▲3.66
Dashboard /wp-admin2,978 ▲445.93 ▼0.17139.45 ▲0.69110.56 ▼2.86
Posts /wp-admin/edit.php2,744 ▲52.72 ▼0.0063.04 ▲2.0791.71 ▲2.80
Add New Post /wp-admin/post-new.php1,686 ▲1618.38 ▼0.73350.22 ▼22.8999.47 ▼3.84
Media Library /wp-admin/upload.php1,815 ▲85.10 ▲0.05143.90 ▼7.59112.94 ▼5.19
Yubikey /wp-admin/options-general.php?page=yubikey1,0852.0555.5579.74

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The plugin uninstalled successfully, without leaving any zombie files or tables

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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-yubikey/yubikey.php:444

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 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots do not have images: #1 (Entering Key ID on the profile page), #2 (Entering Yubico ID & API key on Yubikey options page.), #3 (The enhanced loginbox.), #4 (The Yubikey itself.)
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

woo-yubikey/yubikey.php 92% from 13 tests

The principal PHP file in "yubikey-plugin" v. 2.3 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("woo-yubikey.php" instead of "yubikey.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin395 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP163137279
PO File24552116

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

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
No PNG images were found in this plugin