Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
- The plugin did not install without errors
- > Notice in wp-content/plugins/simple-language-switcher/front/language-switcher-generator.php+11
Trying to access array offset on value of type bool
Server metrics [RAM: ▲0.05MB] [CPU: ▼1.64ms] Passed 4 tests
Server-side resources used by Simple Language Switcher
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 42.91 ▼1.40 |
Dashboard /wp-admin | 3.36 ▲0.06 | 49.80 ▼4.92 |
Posts /wp-admin/edit.php | 3.47 ▲0.12 | 48.59 ▼0.41 |
Add New Post /wp-admin/post-new.php | 5.94 ▲0.05 | 94.03 ▲3.11 |
Media Library /wp-admin/upload.php | 3.28 ▲0.05 | 38.65 ▲0.19 |
Simple Language Switcher /wp-admin/options-general.php?page=sls | 3.23 | 29.41 |
Server storage [IO: ▲0.22MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 12 new options
New WordPress options |
---|
sls_plugin_linking_backup |
sls_plugin_linking |
sls_plugin_options |
can_compress_scripts |
widget_recent-posts |
db_upgraded |
widget_recent-comments |
sls_plugin_langs_backup |
widget_simple-language-switcher |
theysaidso_admin_options |
... |
Browser metrics Passed 4 tests
Simple Language Switcher: an overview of browser usage
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,796 ▲35 | 14.55 ▲0.19 | 1.83 ▼0.01 | 44.37 ▼0.78 |
Dashboard /wp-admin | 2,196 ▲21 | 5.59 ▼0.03 | 85.57 ▼26.89 | 38.90 ▼2.12 |
Posts /wp-admin/edit.php | 2,107 ▲10 | 1.99 ▼0.03 | 40.29 ▲4.86 | 36.54 ▲0.85 |
Add New Post /wp-admin/post-new.php | 1,541 ▲15 | 18.46 ▼4.63 | 638.66 ▼61.63 | 78.30 ▲27.61 |
Media Library /wp-admin/upload.php | 1,410 ▲10 | 4.19 ▼0.00 | 98.66 ▼17.49 | 44.31 ▼3.98 |
Simple Language Switcher /wp-admin/options-general.php?page=sls | 1,872 | 2.01 | 25.02 | 123.90 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- Zombie WordPress options detected upon uninstall: 12 options
- can_compress_scripts
- widget_recent-comments
- widget_recent-posts
- sls_plugin_linking
- theysaidso_admin_options
- sls_plugin_langs_backup
- db_upgraded
- widget_simple-language-switcher
- sls_plugin_options
- sls_plugin_langs
- ...
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
These server-side errors were triggered
- > GET request to /wp-admin/options-general.php?page=sls
- > User deprecated in wp-includes/functions.php+5463
Function screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/options-general.php?page=sls
- > User deprecated in wp-includes/functions.php+5463
Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
- 6× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Class 'SimpleLanguageSwitcher_Front_Display_Strategy' not found in wp-content/plugins/simple-language-switcher/front/strategy/display-language-name.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/simple-language-switcher/simple-language-switcher.php:27
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-language-switcher/front/language-switcher-widget.php:3
- > PHP Fatal error
Uncaught Error: Class 'SimpleLanguageSwitcher_Front_Display_Strategy' not found in wp-content/plugins/simple-language-switcher/front/strategy/display-language-iso.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/simple-language-switcher/admin/options-page.php:3
- > PHP Fatal error
Uncaught Error: Class 'SimpleLanguageSwitcher_Front_Display_Strategy' not found in wp-content/plugins/simple-language-switcher/front/strategy/display-language-flag.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Contributors: The plugin contributors field is not present
simple-language-switcher/simple-language-switcher.php Passed 13 tests
The main file in "Simple Language Switcher" v. 1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
43 characters long description:
A simple and lightweight language switcher.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,208 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 13 | 152 | 41 | 1,478 |
JavaScript | 1 | 0 | 0 | 730 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 8.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 40.00 |
Average method complexity | 2.28 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 11 | |
▷ Abstract classes | 1 | 9.09% |
▷ Concrete classes | 10 | 90.91% |
▷ Final classes | 0 | 0.00% |
Methods | 60 | |
▷ Static methods | 1 | 1.67% |
▷ Public methods | 59 | 98.33% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 1 | 1.67% |
Functions | 2 | |
▷ Named functions | 2 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 3 | 50.00% |
▷ Class constants | 3 | 50.00% |
▷ Public constants | 3 | 100.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
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
flags/ru.png | 0.41KB | 0.64KB | 0.00% |
flags/en.png | 0.58KB | 0.65KB | 0.00% |
flags/fr.png | 0.53KB | 0.63KB | 0.00% |
flags/nl.png | 0.44KB | 0.64KB | 0.00% |