Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼6.29ms] Passed 4 tests
This is a short check of server-side resources used by Language Switcher for Transposh
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 40.31 ▼0.16 |
Dashboard /wp-admin | 3.31 ▼0.04 | 46.02 ▼15.38 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 48.21 ▲3.84 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 83.89 ▼7.79 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 30.98 ▼1.81 |
Server storage [IO: ▲0.46MB] [DB: ▲0.07MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 298 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
db_upgraded |
Browser metrics Passed 4 tests
Language Switcher for Transposh: 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,790 ▲43 | 14.03 ▼0.22 | 1.81 ▲0.14 | 45.22 ▲0.10 |
Dashboard /wp-admin | 2,195 ▲17 | 5.64 ▼0.02 | 86.21 ▼28.08 | 38.34 ▼6.44 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 1.95 ▼0.07 | 39.52 ▲2.21 | 37.33 ▲2.70 |
Add New Post /wp-admin/post-new.php | 1,526 ▼1 | 23.19 ▲0.20 | 680.74 ▲14.25 | 57.72 ▲4.40 |
Media Library /wp-admin/upload.php | 1,400 ▼3 | 4.31 ▲0.05 | 94.08 ▼2.27 | 41.66 ▼0.68 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-posts
- db_upgraded
- widget_recent-comments
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% 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
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/language-switcher-for-transposh/public/partials/cfx-language-switcher-for-transposh-public-display.php
- 3× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/language-switcher-for-transposh/widgets/language-switcher-for-transposh-widget.php:12
- > PHP Notice
file_get_contents(): read of 8192 bytes failed with errno=21 Is a directory in wp-content/plugins/language-switcher-for-transposh/includes/load-list-style.php on line 6
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/language-switcher-for-transposh/admin/partials/cfx-language-switcher-for-transposh-admin-display.php:26
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 90% 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
Attributes that need to be fixed:
- Screenshots: Add an image for screenshot #1 (/assets/lsft.png)
language-switcher-for-transposh/cfx-language-switcher-for-transposh.php 85% from 13 tests
The principal PHP file in "Language Switcher for Transposh" v. 1.5.3 is loaded by WordPress automatically on each request
It is important to fix the following:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Main file name: Name the main plugin file the same as the plugin slug ("language-switcher-for-transposh.php" instead of "cfx-language-switcher-for-transposh.php")
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
Success! There were no dangerous files found in this plugin2,214 lines of code in 30 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 15 | 239 | 949 | 1,425 |
CSS | 12 | 57 | 20 | 644 |
JavaScript | 2 | 20 | 8 | 144 |
SVG | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 20.88 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 72.00 |
Average method complexity | 3.09 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 8 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 8 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 76 | |
▷ Static methods | 2 | 2.63% |
▷ Public methods | 65 | 85.53% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 11 | 14.47% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 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
262 compressed PNG files occupy 0.31MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/flags/ai.png | 0.74KB | 0.75KB | 0.00% |
assets/flags/li.png | 0.25KB | 0.24KB | ▼ 5.10% |
assets/flags/gq.png | 0.48KB | 0.49KB | 0.00% |
assets/flags/es-ga.png | 0.43KB | 0.43KB | 0.00% |
assets/flags/gs.png | 0.84KB | 0.83KB | ▼ 1.40% |