Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.98MB] [CPU: ▲9.69ms] Passed 4 tests
A check of server-side resources used by User Language Switch
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 6.61 ▲3.89 | 45.50 ▲21.78 |
Dashboard /wp-admin | 3.67 ▲0.61 | 58.17 ▲21.60 |
Posts /wp-admin/edit.php | 3.74 ▲0.64 | 54.21 ▲3.53 |
Add New Post /wp-admin/post-new.php | 7.55 ▲2.12 | 1,151.24 ▲496.84 |
Media Library /wp-admin/upload.php | 3.56 ▲0.55 | 43.76 ▼8.14 |
User Language Switch /wp-admin/options-general.php?page=uls-settings-page | 3.62 | 37.71 |
Server storage [IO: ▲0.52MB] [DB: ▲0.35MB] 67% from 3 tests
Input-output and database impact of this plugin
These are issues you should consider
- Illegal file modification found: 1 file (0.63KB) outside of "wp-content/plugins/user-language-switch/" and "wp-content/uploads/"
- (modified) .htaccess
Filesystem: 36 new files
Database: no new tables, 1 new option
New WordPress options |
---|
uls_settings |
Browser metrics Passed 4 tests
User Language Switch: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,858 ▲262 | 16.46 ▲0.98 | 19.06 ▲4.70 | 56.92 ▲11.80 |
Dashboard /wp-admin | 3,006 ▲112 | 5.96 ▲0.08 | 150.39 ▼0.19 | 110.78 ▼6.30 |
Posts /wp-admin/edit.php | 2,825 ▲86 | 2.86 ▲0.14 | 71.75 ▲3.71 | 90.42 ▼1.36 |
Add New Post /wp-admin/post-new.php | 2,026 ▲435 | 23.59 ▲4.79 | 439.28 ▲23.59 | 164.35 ▲54.23 |
Media Library /wp-admin/upload.php | 1,849 ▲42 | 4.97 ▼0.05 | 168.55 ▼3.29 | 117.59 ▲0.20 |
User Language Switch /wp-admin/options-general.php?page=uls-settings-page | 1,396 | 2.24 | 61.24 | 85.56 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.34MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 1 option
- uls_settings
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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
- 6× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/user-language-switch/user-language-switch.php:29
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/user-language-switch/uls-functions.php:107
- > PHP Fatal error
Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/user-language-switch/init.php:37
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/user-language-switch/uls-options.php:883
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/user-language-switch/uls-tab-template.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/user-language-switch/uls-rewrite-rules.php:86
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: translate, multiple language, bilingual, multilingual, i18n...
user-language-switch/user-language-switch.php 92% from 13 tests
This is the main PHP file of "User Language Switch" version 1.6.10, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
- Description: The description should be shorter than 140 characters (currently 144 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected4,816 lines of code in 22 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 413 | 769 | 3,193 |
CSS | 5 | 8 | 25 | 882 |
PO File | 4 | 200 | 261 | 540 |
JavaScript | 5 | 29 | 68 | 201 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.51 |
Average class complexity | 63.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 154.00 |
Average method complexity | 8.09 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 93.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 35 | |
▷ Static methods | 27 | 77.14% |
▷ Public methods | 35 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 62 | |
▷ Named functions | 61 | 98.39% |
▷ Anonymous functions | 1 | 1.61% |
Constants | 6 | |
▷ Global constants | 6 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.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
7 PNG files occupy 0.23MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/star.png | 0.80KB | 1.16KB | 0.00% |
images/flags_16x11.png | 76.71KB | 25.71KB | ▼ 66.48% |
images/twitter.png | 2.94KB | 1.80KB | ▼ 38.81% |
images/facebook.png | 2.76KB | 1.86KB | ▼ 32.53% |
images/linkedin.png | 3.04KB | 1.89KB | ▼ 37.97% |