Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully
Server metrics [RAM: ▲0.64MB] [CPU: ▼2.99ms] Passed 4 tests
This is a short check of server-side resources used by Login with Cognito
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.15 ▲0.69 | 43.76 ▲0.61 |
Dashboard /wp-admin | 3.98 ▲0.67 | 47.28 ▼2.17 |
Posts /wp-admin/edit.php | 4.03 ▲0.67 | 51.51 ▼1.14 |
Add New Post /wp-admin/post-new.php | 6.50 ▲0.61 | 91.03 ▼9.25 |
Media Library /wp-admin/upload.php | 3.84 ▲0.61 | 37.36 ▲2.76 |
Server storage [IO: ▲2.29MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 150 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_recent-comments |
host_name |
db_upgraded |
widget_mocognito_widget |
widget_theysaidso_widget |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Login with Cognito
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,846 ▲89 | 13.30 ▼0.99 | 3.49 ▲1.43 | 38.58 ▼5.69 |
Dashboard /wp-admin | 2,218 ▲30 | 5.84 ▼0.01 | 107.78 ▼8.18 | 74.84 ▲27.50 |
Posts /wp-admin/edit.php | 2,107 ▲18 | 1.97 ▼0.00 | 37.27 ▼1.25 | 35.42 ▲0.50 |
Add New Post /wp-admin/post-new.php | 1,536 ▼6 | 18.07 ▼0.16 | 674.75 ▲35.66 | 61.58 ▲7.34 |
Media Library /wp-admin/upload.php | 1,403 ▲12 | 4.18 ▲0.03 | 98.36 ▲0.21 | 72.14 ▲26.25 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- This plugin does not fully uninstall, leaving 7 options in the database
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- widget_theysaidso_widget
- widget_mocognito_widget
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected
SRP 50% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
- 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/login-with-cognito/class-mocognito-widget.php:11
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/login-with-cognito/class-mocognito-widget.php:11
- > 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 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: sso, aws, amazon, cognito, oauth 20
login-with-cognito/mo_oauth_settings.php 85% from 13 tests
The principal PHP file in "Login with Cognito" v. 1.5.1 is loaded by WordPress automatically on each request
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("login-with-cognito.php" instead of "mo_oauth_settings.php")
- Description: Keep the plugin description shorter than 140 characters (currently 258 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin5,484 lines of code in 56 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 35 | 558 | 1,051 | 4,604 |
SVG | 1 | 0 | 0 | 685 |
JavaScript | 9 | 5 | 36 | 174 |
JSON | 1 | 0 | 0 | 11 |
CSS | 10 | 0 | 6 | 10 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
Please tend to the following items
- Cyclomatic complexity of methods should be reduced to less than 100 (currently 158)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 16.55 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 169.00 |
Average method complexity | 4.21 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 158.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 20 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 20 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 97 | |
▷ Static methods | 32 | 32.99% |
▷ Public methods | 89 | 91.75% |
▷ Protected methods | 1 | 1.03% |
▷ Private methods | 7 | 7.22% |
Functions | 34 | |
▷ Named functions | 34 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 5 | 83.33% |
▷ Class constants | 1 | 16.67% |
▷ Public constants | 1 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
86 PNG files occupy 0.70MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/partials/addons/images/page-restriction.png | 2.46KB | 1.37KB | ▼ 44.45% |
admin/partials/apps/images/laravel.png | 20.41KB | 20.26KB | ▼ 0.74% |
admin/partials/apps/images/invis.png | 12.86KB | 7.59KB | ▼ 40.95% |
admin/partials/apps/images/discord.png | 1.43KB | 1.37KB | ▼ 4.36% |
admin/partials/apps/images/slack.png | 12.59KB | 5.93KB | ▼ 52.88% |