Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼8.51ms] Passed 4 tests
This is a short check of server-side resources used by Matoma Two-Factor Authentication
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.50 ▲0.04 | 38.02 ▼4.19 |
Dashboard /wp-admin | 3.34 ▼0.00 | 46.21 ▼13.13 |
Posts /wp-admin/edit.php | 3.39 ▲0.04 | 46.66 ▲3.99 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.04 | 81.11 ▼12.15 |
Media Library /wp-admin/upload.php | 3.27 ▲0.04 | 32.35 ▼4.58 |
Matoma 2FA /wp-admin/options-general.php?page=mtm-2F-settings | 3.23 | 33.44 |
Server storage [IO: ▲0.07MB] [DB: ▲0.07MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-comments |
db_upgraded |
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 / | 2,806 ▲35 | 14.44 ▼0.24 | 1.77 ▼0.24 | 44.14 ▼0.37 |
Dashboard /wp-admin | 2,210 ▲22 | 5.79 ▼0.06 | 97.67 ▼21.51 | 39.95 ▼3.91 |
Posts /wp-admin/edit.php | 2,090 ▲1 | 2.00 ▼0.01 | 34.74 ▼4.18 | 33.93 ▼2.44 |
Add New Post /wp-admin/post-new.php | 1,545 ▲12 | 18.31 ▼4.81 | 613.48 ▼5.05 | 51.52 ▼0.54 |
Media Library /wp-admin/upload.php | 1,389 ▲7 | 4.17 ▼0.07 | 95.86 ▼3.72 | 39.21 ▼5.29 |
Matoma 2FA /wp-admin/options-general.php?page=mtm-2F-settings | 895 | 2.03 | 23.15 | 27.85 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-posts
- widget_recent-comments
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
- 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > 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
Uncaught Error: Class 'Mtm_2F_Methode' not found in wp-content/plugins/2-factor/includes/Mtm_2F_EMail.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes 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
"Matoma Two-Factor Authentication" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("2-factor.php" instead of "mtm-2f.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,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
A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
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
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin