Benchmarks
Plugin footprint 99% 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.26MB] [CPU: ▲343.59ms] 50% from 4 tests
An overview of server-side resources used by SnapID Two-Factor Authentication
The following require your attention
- CPU: Try to keep total CPU usage under 500.00ms (currently 1,325.01ms on /wp-admin/options-general.php?page=snapid)
- Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 343.59ms on /wp-admin/options-general.php?page=snapid)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.06 ▲0.22 | 35.58 ▼5.49 |
Dashboard /wp-admin | 3.38 ▲0.33 | 701.50 ▲651.38 |
Posts /wp-admin/edit.php | 3.43 ▲0.32 | 689.77 ▲641.39 |
Add New Post /wp-admin/post-new.php | 5.68 ▲0.25 | 753.84 ▲87.08 |
Media Library /wp-admin/upload.php | 3.27 ▲0.26 | 978.93 ▲937.86 |
SnapID™ /wp-admin/options-general.php?page=snapid | 3.29 | 1,325.01 |
Server storage [IO: ▲0.61MB] [DB: ▲0.00MB] 67% from 3 tests
Analyzing filesystem and database footprints of this plugin
These are issues you should consider
- The plugin illegally modified 2 files (0.26KB) outside of "wp-content/plugins/snapid-two-factor-authentication/" and "wp-content/uploads/"
- (new file) wp-admin/cookie.txt
- (new file) cookie.txt
Filesystem: 37 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
This is an overview of browser requirements for SnapID Two-Factor Authentication
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,780 ▲208 | 16.05 ▲0.41 | 10.33 ▲0.70 | 49.84 ▼9.40 |
Dashboard /wp-admin | 3,029 ▲101 | 5.97 ▼0.02 | 151.83 ▼18.43 | 118.89 ▲3.19 |
Posts /wp-admin/edit.php | 2,794 ▲55 | 2.84 ▲0.13 | 77.01 ▲2.75 | 93.88 ▼3.29 |
Add New Post /wp-admin/post-new.php | 1,719 ▲36 | 18.69 ▼0.06 | 401.14 ▲2.27 | 138.73 ▲17.63 |
Media Library /wp-admin/upload.php | 1,860 ▲53 | 5.00 ▼0.03 | 139.90 ▼17.72 | 121.50 ▼9.73 |
SnapID™ /wp-admin/options-general.php?page=snapid | 2,750 | 5.90 | 107.73 | 106.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% 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
The following issues need your attention
- 1× PHP files output text when accessed directly:
- > /wp-content/plugins/snapid-two-factor-authentication/templates/uninstall.php
- 8× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/snapid-two-factor-authentication/templates/message.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/snapid-two-factor-authentication/templates/auth_modal.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/snapid-two-factor-authentication/templates/login_form.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/snapid-two-factor-authentication/templates/settings_page.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_create_nonce() in wp-content/plugins/snapid-two-factor-authentication/templates/profile_hidden_fields.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/snapid-two-factor-authentication/templates/profile.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/snapid-two-factor-authentication/snapid.php:37
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/snapid-two-factor-authentication/templates/settings.php:4
- > 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 issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% 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:
- Tags: Please delete some tags, you are using 14 tag instead of maximum 10
snapid-two-factor-authentication/snapid.php 85% from 13 tests
The entry point to "SnapID Two-Factor Authentication" version 2.0.2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
- Description: Please keep the plugin description shorter than 140 characters (currently 208 characters long)
- Main file name: The principal plugin file should be the same as the plugin slug ("snapid-two-factor-authentication.php" instead of "snapid.php")
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
No dangerous file extensions were detected1,943 lines of code in 21 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 241 | 790 | 1,305 |
JavaScript | 4 | 55 | 8 | 330 |
CSS | 4 | 54 | 0 | 307 |
Markdown | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 40.25 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 145.00 |
Average method complexity | 3.15 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 73 | |
▷ Static methods | 1 | 1.37% |
▷ Public methods | 67 | 91.78% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 6 | 8.22% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 10 | |
▷ Global constants | 10 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
jquery-modal/close.png | 1.87KB | 1.74KB | ▼ 6.60% |
images/SnapID_button.png | 13.67KB | 6.51KB | ▼ 52.38% |
images/SnapID-Register-Button2x.png | 8.63KB | 4.48KB | ▼ 48.09% |
images/SnapIDLogo.png | 12.06KB | 6.41KB | ▼ 46.87% |
images/SnapID-Signin-Button.png | 3.85KB | 2.23KB | ▼ 42.03% |