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: ▲1.67MB] [CPU: ▼286.98ms] Passed 4 tests
An overview of server-side resources used by Woocommerce 2 Factor Authenticator
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 5.21 ▲1.69 | 62.89 ▲11.89 |
Dashboard /wp-admin | 5.11 ▲1.71 | 43.06 ▲8.62 |
Posts /wp-admin/edit.php | 5.34 ▲1.70 | 44.91 ▲10.10 |
Add New Post /wp-admin/post-new.php | 8.60 ▲1.61 | 102.12 ▼1,177.75 |
Media Library /wp-admin/upload.php | 4.99 ▲1.70 | 34.68 ▲11.13 |
Server storage [IO: ▲1.23MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 59 new files
Database: no new tables, 15 new options
New WordPress options |
---|
mo2f_enable_mobile_support |
mo2f_msg_counter |
mo2f_enable_xmlrpc |
mo2f_login_policy |
mo2fa_contributor |
mo2f_activate_plugin |
mo2fa_author |
mo2f_auth_methods_for_users |
mo2f_enable_forgotphone |
mo2f_custom_plugin_name |
... |
Browser metrics Passed 4 tests
Woocommerce 2 Factor Authenticator: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,808 ▲86 | 15.84 ▲0.13 | 6.05 ▲0.12 | 2.27 ▲0.20 |
Dashboard /wp-admin | 2,921 ▲60 | 6.15 ▼0.01 | 120.51 ▼13.17 | 186.55 ▲14.62 |
Posts /wp-admin/edit.php | 2,717 ▲29 | 3.12 ▼0.12 | 72.58 ▲7.89 | 145.67 ▲4.06 |
Add New Post /wp-admin/post-new.php | 1,771 ▲110 | 21.04 ▲3.85 | 450.80 ▲56.92 | 154.55 ▲0.36 |
Media Library /wp-admin/upload.php | 1,721 ▲23 | 5.52 ▼0.01 | 128.19 ▼6.64 | 203.38 ▲23.19 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- This plugin does not fully uninstall, leaving 1 option in the database
- mo2f_enable_xmlrpc
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 | 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
Almost there! Just fix the following items
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/push-authenticator/miniorange_2_factor_settings.php:1784
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/push-authenticator/upgrade.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function mo2f_check_if_registered_with_miniorange() in wp-content/plugins/push-authenticator/miniorange_2_factor_demo.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function mo2f_is_customer_registered() in wp-content/plugins/push-authenticator/miniorange_2_factor_frontend_shortcode.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
- Tags: Please reduce the number of tags, currently 37 tag instead of maximum 10
push-authenticator/miniorange_2_factor_settings.php 92% from 13 tests
The principal PHP file in "Woocommerce 2 Factor Authenticator" v. 1.1.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("push-authenticator.php" instead of "miniorange_2_factor_settings.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin14,709 lines of code in 38 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 19 | 1,627 | 243 | 12,268 |
CSS | 8 | 230 | 9 | 2,174 |
JavaScript | 11 | 6 | 13 | 267 |
PHP code 50% from 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
Please tend to the following items
- Method cyclomatic complexity should be reduced to less than 100 (currently 282)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 113.00 |
▷ Minimum class complexity | 7.00 |
▷ Maximum class complexity | 401.00 |
Average method complexity | 9.06 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 282.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 9 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 9 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 125 | |
▷ Static methods | 7 | 5.60% |
▷ Public methods | 119 | 95.20% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 6 | 4.80% |
Functions | 79 | |
▷ Named functions | 79 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 5 | |
▷ Global constants | 2 | 40.00% |
▷ Class constants | 3 | 60.00% |
▷ Public constants | 3 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
17 PNG files occupy 0.32MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/images/card.png | 59.80KB | 58.49KB | ▼ 2.19% |
includes/images/wrong.png | 12.14KB | 6.37KB | ▼ 47.51% |
includes/images/vertical_line.png | 2.55KB | 1.35KB | ▼ 47.14% |
includes/images/playStore.png | 7.98KB | 2.62KB | ▼ 67.13% |
includes/images/landline_sprite.png | 0.89KB | 0.81KB | ▼ 9.64% |