Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.05MB] [CPU: ▼2.86ms] Passed 4 tests
Analyzing server-side resources used by Two-Factor Authentication - Clockwork SMS
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.03 | 40.93 ▼1.66 |
Dashboard /wp-admin | 3.35 ▲0.05 | 45.11 ▼4.72 |
Posts /wp-admin/edit.php | 3.47 ▲0.11 | 47.15 ▼1.74 |
Add New Post /wp-admin/post-new.php | 5.95 ▲0.07 | 83.53 ▼3.32 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 32.50 ▼1.19 |
Two-Factor SMS /wp-admin/admin.php?page=clockwork_two_factor | 3.27 | 29.56 |
Test /wp-admin/admin.php?page=clockwork_test_message | 3.27 | 31.52 |
Clockwork Options /wp-admin/admin.php?page=clockwork_options | 3.27 | 29.78 |
Server storage [IO: ▲0.31MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 7 new options
New WordPress options |
---|
widget_recent-comments |
widget_theysaidso_widget |
theysaidso_admin_options |
db_upgraded |
widget_recent-posts |
clockwork_two_factor_credit |
can_compress_scripts |
Browser metrics Passed 4 tests
Two-Factor Authentication - Clockwork SMS: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,869 ▲98 | 13.17 ▼1.63 | 5.30 ▲3.19 | 44.65 ▼1.09 |
Dashboard /wp-admin | 2,253 ▲65 | 4.90 ▲0.08 | 96.15 ▼21.28 | 70.19 ▲26.92 |
Posts /wp-admin/edit.php | 2,132 ▲46 | 2.00 ▼0.02 | 38.44 ▲2.07 | 35.39 ▼1.46 |
Add New Post /wp-admin/post-new.php | 1,554 ▲35 | 17.48 ▼5.78 | 729.29 ▲34.60 | 55.72 ▲4.16 |
Media Library /wp-admin/upload.php | 1,429 ▲44 | 4.28 ▼0.01 | 98.81 ▼14.66 | 78.46 ▲30.26 |
Two-Factor SMS /wp-admin/admin.php?page=clockwork_two_factor | 904 | 1.84 | 24.89 | 29.73 |
Test /wp-admin/admin.php?page=clockwork_test_message | 851 | 1.83 | 26.76 | 26.80 |
Clockwork Options /wp-admin/admin.php?page=clockwork_options | 886 | 1.70 | 24.98 | 27.55 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- Zombie WordPress options were found after uninstall: 7 options
- widget_recent-posts
- theysaidso_admin_options
- clockwork_two_factor_credit
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
- > GET request to /wp-admin/admin.php?page=clockwork_two_factor
- > Notice in wp-content/plugins/clockwork-two-factor-authentication/main.php+290
Undefined index: settings-updated
- > GET request to /wp-admin/admin.php?page=clockwork_test_message
- > Notice in wp-content/plugins/clockwork-two-factor-authentication/templates/clockwork-test-message.php+8
Undefined index: to
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
- 5× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Class 'Clockwork' not found in wp-content/plugins/clockwork-two-factor-authentication/lib/clockwork/class-WordPressClockwork.php:15
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/clockwork-two-factor-authentication/clockwork-two-factor.php:74
- > PHP Fatal error
Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/clockwork-two-factor-authentication/templates/required-number-form.php:3
- > PHP Fatal error
Uncaught Error: Class 'Clockwork_Plugin' not found in wp-content/plugins/clockwork-two-factor-authentication/main.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function bloginfo() in wp-content/plugins/clockwork-two-factor-authentication/templates/code-form.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
- Screenshots: These screenshots do not have images: #1 (Settings for Clockwork two-factor authentication), #2 (Prompting for a password on login to the Administration panel), #3 (Not allowing access if you haven't set a mobile number), #4 (Not allowing access if you have entered an incorrect code)
clockwork-two-factor-authentication/clockwork-two-factor.php 92% from 13 tests
The primary PHP file in "Two-Factor Authentication - Clockwork SMS" version 1.1.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("clockwork-two-factor-authentication.php" instead of "clockwork-two-factor.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin1,400 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 289 | 657 | 1,352 |
CSS | 1 | 4 | 0 | 25 |
JavaScript | 1 | 9 | 3 | 23 |
PHP code Passed 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 34.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 70.00 |
Average method complexity | 4.06 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 34.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 5 | |
▷ Abstract classes | 2 | 40.00% |
▷ Concrete classes | 3 | 60.00% |
▷ Final classes | 0 | 0.00% |
Methods | 57 | |
▷ Static methods | 1 | 1.75% |
▷ Public methods | 47 | 82.46% |
▷ Protected methods | 9 | 15.79% |
▷ Private methods | 1 | 1.75% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 13 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 13 | 100.00% |
▷ Public constants | 13 | 100.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
7 PNG files occupy 0.24MB with 0.16MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 68.66KB | 20.43KB | ▼ 70.24% |
screenshot-4.png | 26.34KB | 7.53KB | ▼ 71.41% |
images/logo_16px_16px.png | 0.43KB | 0.31KB | ▼ 27.56% |
screenshot-2.png | 27.42KB | 7.93KB | ▼ 71.09% |
images/badrobot.png | 92.94KB | 10.20KB | ▼ 89.03% |