Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.73MB] [CPU: ▼289.05ms] Passed 4 tests
An overview of server-side resources used by 2FAS Prime — Two Factor Authentication
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.28 ▲0.77 | 60.87 ▲10.36 |
Dashboard /wp-admin | 4.13 ▲0.72 | 37.55 ▲4.92 |
Posts /wp-admin/edit.php | 4.42 ▲0.77 | 41.83 ▲5.44 |
Add New Post /wp-admin/post-new.php | 7.65 ▲0.68 | 95.37 ▼1,169.21 |
Media Library /wp-admin/upload.php | 4.07 ▲0.78 | 26.55 ▲2.64 |
Admin settings /wp-admin/admin.php?page=twofas-light-admin-settings | 4.53 | 32.96 |
Personal settings /wp-admin/admin.php?page=twofas-light-personal-settings | 5.97 | 89.90 |
Server storage [IO: ▲23.09MB] [DB: ▲0.01MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 1,228 new files
Database: 5 new tables, 2 new options
New tables |
---|
wp_twofas_light_sessions |
wp_twofas_light_trusted_devices |
wp_twofas_light_authentications |
wp_twofas_light_migrations |
wp_twofas_light_session_variables |
New WordPress options |
---|
twofas_light_remember_browser_allowed_rolesl |
twofas_light_plugin_version |
Browser metrics Passed 4 tests
An overview of browser requirements for 2FAS Prime — Two Factor Authentication
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,877 ▲123 | 15.10 ▼0.46 | 5.77 ▼0.36 | 2.15 ▼0.69 |
Dashboard /wp-admin | 2,972 ▲114 | 6.24 ▲0.04 | 121.55 ▼15.39 | 151.53 ▼12.19 |
Posts /wp-admin/edit.php | 2,769 ▲78 | 3.25 ▲0.01 | 67.05 ▲2.10 | 137.70 ▼9.14 |
Add New Post /wp-admin/post-new.php | 1,697 ▲36 | 16.14 ▲0.22 | 404.73 ▼41.86 | 153.19 ▼10.84 |
Media Library /wp-admin/upload.php | 1,779 ▲81 | 5.59 ▲0.08 | 143.73 ▼1.20 | 183.87 ▼2.91 |
Admin settings /wp-admin/admin.php?page=twofas-light-admin-settings | 1,570 | 2.47 | 57.55 | 156.16 |
Personal settings /wp-admin/admin.php?page=twofas-light-personal-settings | 2,348 | 2.71 | 60.52 | 184.07 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully
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
Good news, no errors were detected
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
- 471× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/2fas-light/vendor/twig/twig/src/Node/PrintNode.php:23
- > PHP Fatal error
Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/2fas-light/vendor/twig/twig/src/TokenParser/AutoEscapeTokenParser.php:22
- > PHP Fatal error
Uncaught Error: Interface 'Twig\\Loader\\LoaderInterface' not found in wp-content/plugins/2fas-light/vendor/twig/twig/src/Loader/FilesystemLoader.php:22
- > PHP Fatal error
Uncaught Error: Class 'WhichBrowser\\Data\\Applications' not found in wp-content/plugins/2fas-light/vendor/whichbrowser/parser/data/regexes/applications-browsers.php:5
- > PHP Fatal error
Uncaught Error: Interface 'TwoFAS\\Light\\Hooks\\Hook_Interface' not found in wp-content/plugins/2fas-light/src/Hooks/Authenticate_Filter.php:11
- > PHP Fatal error
Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/2fas-light/vendor/twig/twig/src/Node/Expression/Binary/OrBinary.php:17
- > PHP Fatal error
Uncaught Error: Class 'TwoFAS\\Light\\Http\\Controllers\\Controller' not found in wp-content/plugins/2fas-light/src/Http/Controllers/Update_Obligatory_Roles.php:12
- > PHP Fatal error
Uncaught Error: Class 'TwoFAS\\Light\\Http\\Middleware\\Middleware' not found in wp-content/plugins/2fas-light/src/Http/Middleware/Check_User_Is_Admin.php:15
- > PHP Fatal error
Uncaught Error: Class 'TwoFAS\\Light\\Exceptions\\Http_Exception' not found in wp-content/plugins/2fas-light/src/Exceptions/Method_Not_Allowed_Http_Exception.php:8
- > PHP Fatal error
Uncaught Error: Class 'DI\\Definition\\Resolver\\ObjectCreator' not found in wp-content/plugins/2fas-light/vendor/php-di/php-di/src/Definition/Resolver/InstanceInjector.php:18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
- Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
2fas-light/twofas_light.php 92% from 13 tests
Analyzing the main PHP file in "2FAS Prime — Two Factor Authentication" version 3.3.1
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("2fas-light.php" instead of "twofas_light.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected110,652 lines of code in 1,197 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 982 | 14,930 | 19,218 | 99,320 |
reStructuredText | 104 | 2,454 | 2,404 | 2,930 |
Sass | 31 | 424 | 30 | 2,195 |
CSS | 4 | 391 | 2 | 2,068 |
JSON | 2 | 0 | 0 | 1,080 |
Twig | 34 | 95 | 0 | 917 |
Markdown | 10 | 343 | 0 | 746 |
JavaScript | 4 | 124 | 7 | 693 |
PO File | 1 | 161 | 208 | 437 |
YAML | 5 | 15 | 0 | 109 |
XML | 5 | 7 | 0 | 96 |
Bourne Shell | 1 | 6 | 1 | 43 |
SVG | 14 | 0 | 0 | 18 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 210)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 8.34 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 484.00 |
Average method complexity | 3.02 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 210.00 |
Code structure | ||
---|---|---|
Namespaces | 120 | |
Interfaces | 62 | |
Traits | 26 | |
Classes | 830 | |
▷ Abstract classes | 40 | 4.82% |
▷ Concrete classes | 790 | 95.18% |
▷ Final classes | 108 | 13.67% |
Methods | 3,550 | |
▷ Static methods | 268 | 7.55% |
▷ Public methods | 2,823 | 79.52% |
▷ Protected methods | 216 | 6.08% |
▷ Private methods | 511 | 14.39% |
Functions | 315 | |
▷ Named functions | 137 | 43.49% |
▷ Anonymous functions | 178 | 56.51% |
Constants | 362 | |
▷ Global constants | 15 | 4.14% |
▷ Class constants | 347 | 95.86% |
▷ Public constants | 345 | 99.42% |
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
3 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
vendor/endroid/qr-code/assets/symfony.png | 15.90KB | 16.60KB | 0.00% |
assets/img/phone@2x.png | 53.07KB | 24.54KB | ▼ 53.76% |
assets/img/phone.png | 18.06KB | 9.36KB | ▼ 48.19% |