Benchmarks
Plugin footprint 48% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▼0.82MB] [CPU: ▼37.94ms] Passed 4 tests
Server-side resources used by Swipe
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.61 ▲0.15 | 34.39 ▼8.70 |
Dashboard /wp-admin | 3.14 ▼0.21 | 24.88 ▼39.57 |
Posts /wp-admin/edit.php | 3.14 ▼0.22 | 23.62 ▼25.63 |
Add New Post /wp-admin/post-new.php | 3.14 ▼2.75 | 25.64 ▼76.00 |
Media Library /wp-admin/upload.php | 3.14 ▼0.09 | 29.85 ▼10.55 |
Documentation /wp-admin/admin.php?page=swipe_documentation | 3.14 | 27.62 |
Settings /wp-admin/admin.php?page=swipe_settings | 3.14 | 26.07 |
Generate QR /wp-admin/admin.php?page=swipe_generate | 3.14 | 26.54 |
Swipe Users /wp-admin/admin.php?page=swipe_qr_users | 3.14 | 23.70 |
Server storage [IO: ▲0.70MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 32 new files
Database: 3 new tables, 6 new options
New tables |
---|
wp_swipe |
wp_swipe_app_logs |
wp_swipe_app_users |
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
Swipe: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,911 ▲150 | 14.49 ▲0.14 | 1.63 ▼0.00 | 28.30 ▼15.25 |
Dashboard /wp-admin | 2,221 ▲44 | 5.59 ▼0.08 | 86.69 ▼17.38 | 72.04 ▲26.05 |
Posts /wp-admin/edit.php | 2,141 ▲44 | 1.97 ▼0.02 | 42.19 ▲7.17 | 40.60 ▲2.30 |
Add New Post /wp-admin/post-new.php | 1,712 ▲184 | 22.39 ▼0.80 | 670.55 ▼11.40 | 49.29 ▼3.16 |
Media Library /wp-admin/upload.php | 1,438 ▲38 | 4.23 ▲0.04 | 102.09 ▼7.90 | 78.54 ▲30.98 |
Documentation /wp-admin/admin.php?page=swipe_documentation | 966 | 1.85 | 29.22 | 235.37 |
Settings /wp-admin/admin.php?page=swipe_settings | 1,114 | 1.78 | 24.97 | 40.45 |
Generate QR /wp-admin/admin.php?page=swipe_generate | 908 | 2.06 | 24.20 | 35.62 |
Swipe Users /wp-admin/admin.php?page=swipe_qr_users | 952 | 1.70 | 24.82 | 32.19 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- The plugin did not uninstall gracefully
- > User notice in wp-includes/functions.php+5905
Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
- Zombie tables were found after uninstall: 3 tables
- wp_swipe_app_users
- wp_swipe
- wp_swipe_app_logs
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- 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
Almost there, just fix the following server-side errors
- 16 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=swipe_qr_users
- > User notice in wp-includes/functions.php+5905
Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=swipe_qr_users
- > Notice in wp-content/plugins/swipe/controller.php+278
Undefined index: HTTP_CLIENT_IP
- 4 occurences, only the last one shown
- > GET request to /wp-admin/admin.php?page=swipe_qr_users
- > Notice in wp-content/plugins/swipe/controller.php+279
Undefined index: HTTP_X_FORWARDED_FOR
SRP 0% 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
The following issues need your attention
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/swipe/templates/login.php
- 6× PHP files trigger server errors when accessed directly:
- > PHP Notice
Trying to get property 'display_name' of non-object in wp-content/plugins/swipe/templates/email.php on line 33
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/swipe/controller.php:7
- > PHP Notice
Undefined variable: attachment in wp-content/plugins/swipe/templates/email.php on line 46
- > PHP Notice
Undefined variable: blog_name in wp-content/plugins/swipe/templates/email.php on line 27
- > PHP Notice
Undefined variable: user in wp-content/plugins/swipe/templates/email.php on line 33
- > PHP Fatal error
Uncaught Error: Call to undefined function site_url() in wp-content/plugins/swipe/templates/email.php:61
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
9 plugin tags: 2fa, two factor, two factor auth, security, password...
swipe/swipe.php Passed 13 tests
The primary PHP file in "Swipe" version 1.4 is used by WordPress to initiate all plugin functionality
30 characters long description:
Wordpress login with swipe app
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
Success! There were no dangerous files found in this plugin4,721 lines of code in 15 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 5 | 1,001 | 291 | 2,512 |
PHP | 8 | 104 | 110 | 1,283 |
CSS | 2 | 40 | 13 | 926 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 82.00 |
▷ Minimum class complexity | 82.00 |
▷ Maximum class complexity | 82.00 |
Average method complexity | 3.53 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 32 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 32 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 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
13 PNG files occupy 0.14MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/add-website.png | 63.37KB | 28.53KB | ▼ 54.98% |
images/wp-icon-24.png | 1.55KB | 1.04KB | ▼ 32.64% |
images/doc.png | 1.41KB | 0.68KB | ▼ 51.69% |
images/install.png | 1.20KB | 0.31KB | ▼ 74.18% |
images/google.png | 5.84KB | 2.66KB | ▼ 54.51% |