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.20MB] [CPU: ▼296.70ms] Passed 4 tests
Server-side resources used by Matoma Two-Factor Authentication
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.79 ▲0.28 | 60.49 ▼1.39 |
Dashboard /wp-admin | 3.63 ▲0.23 | 39.39 ▲3.14 |
Posts /wp-admin/edit.php | 3.86 ▲0.22 | 42.73 ▲0.53 |
Add New Post /wp-admin/post-new.php | 7.09 ▲0.13 | 108.97 ▼1,188.33 |
Media Library /wp-admin/upload.php | 3.52 ▲0.22 | 27.69 ▲2.38 |
Matoma 2FA /wp-admin/options-general.php?page=mtm-2F-settings | 3.48 | 28.47 |
Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
An overview of browser requirements for Matoma Two-Factor Authentication
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,777 ▲55 | 15.68 ▼0.35 | 5.79 ▼0.64 | 2.02 ▼0.20 |
Dashboard /wp-admin | 2,883 ▲25 | 6.13 ▼0.02 | 123.68 ▼14.43 | 196.47 ▲25.44 |
Posts /wp-admin/edit.php | 2,693 ▼1 | 3.23 ▼0.01 | 62.99 ▼1.65 | 145.29 ▲1.39 |
Add New Post /wp-admin/post-new.php | 1,664 ▲3 | 16.89 ▲0.75 | 401.51 ▼44.15 | 159.03 ▲4.51 |
Media Library /wp-admin/upload.php | 1,706 ▲11 | 5.53 ▲0.04 | 139.86 ▼11.90 | 217.98 ▼15.53 |
Matoma 2FA /wp-admin/options-general.php?page=mtm-2F-settings | 1,154 | 2.37 | 54.37 | 124.11 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
The following issues need your attention
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Class 'Mtm_2F_Methode' not found in wp-content/plugins/2-factor/includes/Mtm_2F_EMail.php:4
- > PHP Fatal error
Uncaught Error: Class 'Mtm_2F_Methode' not found in wp-content/plugins/2-factor/includes/Mtm_2F_SMS.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/2-factor/mtm-2f.php:13
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% 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
Attributes that need to be fixed:
- Screenshots: Please add images for these screenshots: #1 (settings), #2 (login mask)
2-factor/mtm-2f.php 85% from 13 tests
The entry point to "Matoma Two-Factor Authentication" version 1.0.3 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Main file name: It is recommended to name the main PHP file as the plugin slug ("2-factor.php" instead of "mtm-2f.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,254 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 235 | 366 | 1,072 |
CSS | 2 | 13 | 3 | 99 |
JavaScript | 1 | 13 | 7 | 83 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.33 |
Average class complexity | 17.43 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 50.00 |
Average method complexity | 3.09 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 16.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 1 | 14.29% |
▷ Concrete classes | 6 | 85.71% |
▷ Final classes | 0 | 0.00% |
Methods | 59 | |
▷ Static methods | 13 | 22.03% |
▷ Public methods | 56 | 94.92% |
▷ Protected methods | 1 | 1.69% |
▷ Private methods | 2 | 3.39% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
PNG images were not found in this plugin