Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.50MB] [CPU: ▼3.33ms] Passed 4 tests
This is a short check of server-side resources used by Fortytwo - Two-Factor Authentication
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.95 ▲0.49 | 44.14 ▲3.28 |
Dashboard /wp-admin | 3.86 ▲0.55 | 51.91 ▼3.56 |
Posts /wp-admin/edit.php | 3.91 ▲0.55 | 55.39 ▲3.13 |
Add New Post /wp-admin/post-new.php | 6.38 ▲0.49 | 87.91 ▼16.18 |
Media Library /wp-admin/upload.php | 3.72 ▲0.49 | 41.25 ▲5.37 |
Two Factor Authentication /wp-admin/options-general.php?page=fortytwo-2fa-admin | 3.71 | 35.68 |
Server storage [IO: ▲4.50MB] [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: 902 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
widget_recent-comments |
widget_theysaidso_widget |
db_upgraded |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for Fortytwo - Two-Factor Authentication
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲57 | 14.38 ▲0.03 | 2.11 ▲0.51 | 45.69 ▲5.22 |
Dashboard /wp-admin | 2,202 ▲31 | 5.60 ▲0.07 | 92.17 ▼7.45 | 40.94 ▼3.27 |
Posts /wp-admin/edit.php | 2,104 ▲1 | 2.02 ▲0.02 | 40.66 ▼2.66 | 34.49 ▼2.56 |
Add New Post /wp-admin/post-new.php | 1,528 ▼9 | 23.64 ▲5.35 | 658.17 ▲9.39 | 53.80 ▼21.55 |
Media Library /wp-admin/upload.php | 1,398 ▲1 | 4.27 ▲0.11 | 96.74 ▼7.36 | 43.18 ▼3.09 |
Two Factor Authentication /wp-admin/options-general.php?page=fortytwo-2fa-admin | 1,147 | 2.03 | 27.84 | 35.65 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-comments
- can_compress_scripts
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
- > GET request to /wp-admin/options-general.php?page=fortytwo-2fa-admin
- > Warning in wp-content/plugins/fortytwo-two-factor-authentication/src/Artefact/LoginBehaviorSection.php+116
count(): Parameter must be an array or an object that implements Countable
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 6× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/fortytwo-two-factor-authentication/vendor/phpcollection/phpcollection/tests/bootstrap.php
- > /wp-content/plugins/fortytwo-two-factor-authentication/vendor/fortytwo/php-sdk-two-factor-authentication/tests/Bootstrap.php
- > /wp-content/plugins/fortytwo-two-factor-authentication/vendor/phpoption/phpoption/tests/bootstrap.php
- > /wp-content/plugins/fortytwo-two-factor-authentication/vendor/fortytwo/php-sdk-core/tests/Bootstrap.php
- > /wp-content/plugins/fortytwo-two-factor-authentication/vendor/jms/serializer/tests/benchmark.php
- > /wp-content/plugins/fortytwo-two-factor-authentication/vendor/jms/parser-lib/tests/bootstrap.php
- 330× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'JMS\\Serializer\\Exclusion\\ExclusionStrategyInterface' not found in wp-content/plugins/fortytwo-two-factor-authentication/vendor/jms/serializer/src/JMS/Serializer/Exclusion/GroupsExclusionStrategy.php:25
- > PHP Fatal error
Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/fortytwo-two-factor-authentication/vendor/guzzlehttp/promises/src/Promise.php:9
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/fortytwo-two-factor-authentication/vendor/guzzlehttp/psr7/tests/LazyOpenStreamTest.php:6
- > PHP Fatal error
Uncaught Error: Class 'JMS\\Serializer\\Metadata\\ClassMetadata' not found in wp-content/plugins/fortytwo-two-factor-authentication/vendor/jms/serializer/tests/JMS/Serializer/Tests/Metadata/Driver/php/ObjectWithAbsentXmlListNode.php:9
- > PHP Fatal error
Uncaught Error: Class 'Fortytwo\\Wordpress\\Plugin\\TwoFactorAuthentication\\Value\\AbstractCollectionValue' not found in wp-content/plugins/fortytwo-two-factor-authentication/src/Value/RegisterStateValue.php:12
- > PHP Fatal error
Uncaught Error: Class 'JMS\\Serializer\\Metadata\\ClassMetadata' not found in wp-content/plugins/fortytwo-two-factor-authentication/vendor/jms/serializer/tests/JMS/Serializer/Tests/Metadata/Driver/php/Discriminator.Car.php:5
- > PHP Fatal error
Uncaught Error: Interface 'Metadata\\Driver\\DriverInterface' not found in wp-content/plugins/fortytwo-two-factor-authentication/vendor/jms/serializer/src/JMS/Serializer/Metadata/Driver/AbstractDoctrineTypeDriver.php:31
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/fortytwo-two-factor-authentication/vendor/jms/serializer/tests/JMS/Serializer/Tests/Handler/FormErrorHandlerTest.php:15
- > PHP Fatal error
Uncaught Error: Class 'JMS\\Serializer\\Metadata\\PropertyMetadata' not found in wp-content/plugins/fortytwo-two-factor-authentication/vendor/jms/serializer/src/JMS/Serializer/Metadata/StaticPropertyMetadata.php:21
- > PHP Fatal error
Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/fortytwo-two-factor-authentication/vendor/guzzlehttp/psr7/src/CachingStream.php:10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: register, two factor authentication, 2-factor, login, 2-step verification...
fortytwo-two-factor-authentication/fortytwo-2fa.php 92% from 13 tests
"Fortytwo - Two-Factor Authentication" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("fortytwo-two-factor-authentication.php" instead of "fortytwo-2fa.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected40,667 lines of code in 848 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 566 | 7,456 | 15,535 | 32,405 |
Markdown | 31 | 1,057 | 0 | 3,643 |
JSON | 17 | 0 | 0 | 1,346 |
XML | 108 | 16 | 1 | 987 |
reStructuredText | 14 | 349 | 455 | 723 |
YAML | 95 | 56 | 0 | 712 |
JavaScript | 3 | 20 | 59 | 429 |
HTML | 9 | 23 | 0 | 363 |
make | 2 | 11 | 0 | 31 |
Bourne Shell | 1 | 0 | 0 | 14 |
CSS | 2 | 2 | 0 | 14 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 5.68 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 139.00 |
Average method complexity | 1.98 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 72.00 |
Code structure | ||
---|---|---|
Namespaces | 92 | |
Interfaces | 50 | |
Traits | 5 | |
Classes | 491 | |
▷ Abstract classes | 28 | 5.70% |
▷ Concrete classes | 463 | 94.30% |
▷ Final classes | 52 | 11.23% |
Methods | 2,793 | |
▷ Static methods | 104 | 3.72% |
▷ Public methods | 2,477 | 88.69% |
▷ Protected methods | 105 | 3.76% |
▷ Private methods | 211 | 7.55% |
Functions | 486 | |
▷ Named functions | 59 | 12.14% |
▷ Anonymous functions | 427 | 87.86% |
Constants | 103 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 103 | 100.00% |
▷ Public constants | 103 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.41MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
src/Img/flags.png | 68.14KB | 23.38KB | ▼ 65.68% |
assets/screenshot-2.png | 25.60KB | 10.75KB | ▼ 57.99% |
src/Img/flags@2x.png | 181.43KB | 64.26KB | ▼ 64.58% |
assets/screenshot-3.png | 22.76KB | 9.86KB | ▼ 56.69% |
assets/screenshot-4.png | 36.42KB | 13.98KB | ▼ 61.60% |