Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully
Server metrics [RAM: ▲4.76MB] [CPU: ▼17.77ms] Passed 4 tests
Server-side resources used by Magic Login API
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.75 ▲5.29 | 45.03 ▲1.89 |
Dashboard /wp-admin | 8.77 ▲5.46 | 45.04 ▼9.08 |
Posts /wp-admin/edit.php | 8.77 ▲5.41 | 43.54 ▼11.36 |
Add New Post /wp-admin/post-new.php | 8.77 ▲2.88 | 53.07 ▼52.52 |
Media Library /wp-admin/upload.php | 8.77 ▲5.54 | 60.22 ▲22.31 |
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius | 8.77 | 44.64 |
Server storage [IO: ▲3.02MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 176 new files
Database: no new tables, 11 new options
New WordPress options |
---|
widget_recent-comments |
magicloginapi_token_settings_options |
fs_debug_mode |
fs_gdpr |
fs_accounts |
theysaidso_admin_options |
can_compress_scripts |
widget_theysaidso_widget |
widget_recent-posts |
fs_active_plugins |
... |
Browser metrics Passed 4 tests
Magic Login API: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,846 ▲85 | 13.43 ▼0.96 | 1.87 ▲0.18 | 27.55 ▼21.15 |
Dashboard /wp-admin | 2,252 ▲49 | 5.86 ▲0.03 | 105.20 ▼8.67 | 62.82 ▲14.38 |
Posts /wp-admin/edit.php | 2,135 ▲32 | 1.99 ▼0.01 | 37.41 ▼9.55 | 43.81 ▲0.63 |
Add New Post /wp-admin/post-new.php | 1,696 ▲142 | 21.82 ▲3.59 | 757.56 ▲125.25 | 75.34 ▲19.84 |
Media Library /wp-admin/upload.php | 1,431 ▲31 | 4.17 ▼0.04 | 99.28 ▼8.99 | 82.78 ▲39.09 |
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius | 1,081 | 1.70 | 29.32 | 29.33 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- The plugin did not uninstall gracefully
- > User notice in wp-includes/functions.php+5905
Function register_rest_route was called incorrectly. REST API routes must be registered on the rest_api_init action. Please see Debugging in WordPress for more information. (This message was added in version 5.1.0.)
- This plugin did not uninstall successfully, leaving 11 options in the database
- widget_theysaidso_widget
- widget_recent-comments
- fs_gdpr
- fs_active_plugins
- magicloginapi_token_settings_options
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- fs_accounts
- fs_debug_mode
- ...
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
- > GET request to /wp-admin/admin.php?page=freemius
- > User notice in wp-includes/functions.php+5905
Function register_rest_route was called incorrectly. REST API routes must be registered on the rest_api_init action. Please see Debugging in WordPress for more information. (This message was added in version 5.1.0.)
- > GET request to /wp-admin/admin.php?page=freemius
- > User notice in wp-includes/functions.php+5905
Function register_rest_route was called incorrectly. The REST API route definition for magicloginapi/v1/get-token is missing the required permission_callback argument. For REST API routes that are intended to be public, use __return_true as the permission callback. Please see Debugging in WordPress for more information. (This message was added in version 5.5.0.)
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
- 7× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
require_once(): Failed opening required 'MAGICLOGINAPI_PATHadmin/core/start.php' (include_path='.:/usr/share/php') in wp-content/plugins/magic-login-api/lib/core.php on line 9
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/magic-login-api/admin/admin-setting.php:162
- > PHP Fatal error
Uncaught Error: Class 'MagicLoginAPI' not found in wp-content/plugins/magic-login-api/lib/class-magicloginapi.php:3
- > PHP Warning
Use of undefined constant MAGICLOGINAPI_PATH - assumed 'MAGICLOGINAPI_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/magic-login-api/lib/core.php on line 9
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/magic-login-api/magicloginmail.php:40
- > PHP Warning
require_once(MAGICLOGINAPI_PATHadmin/core/start.php): failed to open stream: No such file or directory in wp-content/plugins/magic-login-api/lib/core.php on line 9
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/magic-login-api/lib/class-magicloginmail.php:38
- > 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 issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: magic, login, api, email, passwordless
magic-login-api/magicloginmail.php 85% from 13 tests
Analyzing the main PHP file in "Magic Login API" version 1.1.2
You should first fix the following items:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Main file name: It is recommended to name the main PHP file as the plugin slug ("magic-login-api.php" instead of "magicloginmail.php")
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin31,820 lines of code in 129 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 113 | 7,408 | 16,324 | 31,371 |
Markdown | 1 | 68 | 0 | 214 |
JavaScript | 3 | 34 | 59 | 194 |
JSON | 1 | 0 | 0 | 27 |
CSS | 11 | 0 | 0 | 14 |
PHP code 50% from 2 tests
An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Please fix the following
- Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,911)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 88.02 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 2,911.00 |
Average method complexity | 4.65 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 86.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 47 | |
▷ Abstract classes | 2 | 4.26% |
▷ Concrete classes | 45 | 95.74% |
▷ Final classes | 0 | 0.00% |
Methods | 1,150 | |
▷ Static methods | 173 | 15.04% |
▷ Public methods | 802 | 69.74% |
▷ Protected methods | 15 | 1.30% |
▷ Private methods | 333 | 28.96% |
Functions | 114 | |
▷ Named functions | 112 | 98.25% |
▷ Anonymous functions | 2 | 1.75% |
Constants | 124 | |
▷ Global constants | 99 | 79.84% |
▷ Class constants | 25 | 20.16% |
▷ Public constants | 25 | 100.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
5 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/core/assets/img/plugin-icon.png | 2.64KB | 2.49KB | ▼ 5.55% |
admin/core/assets/img/theme-icon.png | 10.97KB | 5.78KB | ▼ 47.37% |
admin/core/assets/img/magic-login-icon.png | 2.64KB | 2.49KB | ▼ 5.55% |
admin/core/assets/img/magic-login-icon_36.png | 0.80KB | 0.79KB | ▼ 1.33% |
admin/core/assets/img/magic-login-api.png | 2.64KB | 2.49KB | ▼ 5.55% |