Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.49MB] [CPU: ▼8.56ms] Passed 4 tests
An overview of server-side resources used by Two-Factor
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.99 ▲0.53 | 37.75 ▼0.14 |
Dashboard /wp-admin | 3.82 ▲0.52 | 47.97 ▼11.86 |
Posts /wp-admin/edit.php | 3.87 ▲0.52 | 48.29 ▼0.06 |
Add New Post /wp-admin/post-new.php | 6.37 ▲0.48 | 80.90 ▼22.17 |
Media Library /wp-admin/upload.php | 3.68 ▲0.45 | 36.97 ▲1.69 |
Server storage [IO: ▲0.59MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-comments |
widget_recent-posts |
can_compress_scripts |
db_upgraded |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Two-Factor
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲43 | 14.17 ▼0.18 | 1.63 ▼0.00 | 41.24 ▲1.00 |
Dashboard /wp-admin | 2,192 ▲12 | 5.51 ▼0.14 | 81.79 ▼10.11 | 36.49 ▼1.21 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 2.01 ▲0.05 | 33.98 ▼0.12 | 34.19 ▼2.17 |
Add New Post /wp-admin/post-new.php | 1,526 ▼23 | 23.16 ▲4.65 | 672.35 ▲30.54 | 52.77 ▼9.30 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.19 ▲0.03 | 93.80 ▲1.01 | 42.23 ▼2.51 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_recent-comments
- can_compress_scripts
- db_upgraded
- widget_recent-posts
- widget_theysaidso_widget
- theysaidso_admin_options
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
Even though no errors were found, this is by no means an exhaustive test
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 items
- 9× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Class 'Two_Factor_Provider' not found in wp-content/plugins/two-factor/providers/class-two-factor-fido-u2f.php:15
- > PHP Fatal error
Uncaught Error: Class 'Two_Factor_Provider' not found in wp-content/plugins/two-factor/providers/class-two-factor-totp.php:11
- > PHP Fatal error
Uncaught Error: Class 'Two_Factor_Provider' not found in wp-content/plugins/two-factor/providers/class-two-factor-email.php:15
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/two-factor/providers/class-two-factor-fido-u2f-admin-list-table.php on line 10
- > PHP Fatal error
Uncaught Error: Class 'Two_Factor_Provider' not found in wp-content/plugins/two-factor/providers/class-two-factor-dummy.php:15
- > PHP Warning
require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/two-factor/providers/class-two-factor-fido-u2f-admin-list-table.php on line 10
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/two-factor/two-factor.php:24
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/two-factor/providers/class-two-factor-fido-u2f-admin-list-table.php on line 10
- > PHP Fatal error
Uncaught Error: Class 'Two_Factor_Provider' not found in wp-content/plugins/two-factor/providers/class-two-factor-backup-codes.php:15
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Tags: There are too many tags (11 tag instead of maximum 10)
two-factor/two-factor.php Passed 13 tests
The principal PHP file in "Two-Factor" v. 0.8.2 is loaded by WordPress automatically on each request
132 characters long description:
Two-Factor Authentication using time-based one-time passwords, Universal 2nd Factor (FIDO U2F), email and backup verification codes.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin5,003 lines of code in 23 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 14 | 654 | 1,956 | 2,607 |
JavaScript | 5 | 621 | 528 | 2,110 |
Markdown | 1 | 43 | 0 | 237 |
CSS | 2 | 11 | 0 | 43 |
SVG | 1 | 0 | 0 | 6 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.31 |
Average class complexity | 20.47 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 124.00 |
Average method complexity | 2.85 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 24.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 15 | |
▷ Abstract classes | 1 | 6.67% |
▷ Concrete classes | 14 | 93.33% |
▷ Final classes | 0 | 0.00% |
Methods | 164 | |
▷ Static methods | 80 | 48.78% |
▷ Public methods | 145 | 88.41% |
▷ Protected methods | 12 | 7.32% |
▷ Private methods | 7 | 4.27% |
Functions | 7 | |
▷ Named functions | 4 | 57.14% |
▷ Anonymous functions | 3 | 42.86% |
Constants | 40 | |
▷ Global constants | 2 | 5.00% |
▷ Class constants | 38 | 95.00% |
▷ Public constants | 38 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 compressed PNG files occupy 0.34MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/icon-128x128.png | 1.20KB | 1.21KB | 0.00% |
assets/screenshot-3.png | 5.97KB | 5.52KB | ▼ 7.51% |
assets/banner-772x250.png | 2.20KB | 2.80KB | 0.00% |
assets/screenshot-1.png | 171.25KB | 94.11KB | ▼ 45.05% |
assets/icon-256x256.png | 2.29KB | 2.46KB | 0.00% |