Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully
Server metrics [RAM: ▲4.49MB] [CPU: ▲37.55ms] Passed 4 tests
Server-side resources used by Translate Multilingual sites - TranslatePress
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 8.05 ▲4.59 | 164.95 ▲126.72 |
Dashboard /wp-admin | 7.83 ▲4.52 | 86.96 ▲40.84 |
Posts /wp-admin/edit.php | 7.87 ▲4.52 | 82.46 ▲37.73 |
Add New Post /wp-admin/post-new.php | 10.36 ▲4.47 | 133.43 ▲37.61 |
Media Library /wp-admin/upload.php | 7.68 ▲4.45 | 67.59 ▲34.02 |
TRPHidden /wp-admin/admin.php?page=trp_advanced_page | 7.50 | 57.64 |
TRPHidden /wp-admin/admin.php?page=trp_test_machine_api | 7.66 | 62.90 |
TRPHidden /wp-admin/admin.php?page=trp_optin_page | 7.66 | 63.35 |
TRPHidden /wp-admin/admin.php?page=trp_license_key | 7.50 | 52.26 |
TRPHidden /wp-admin/admin.php?page=trp_update_database | 7.65 | 56.73 |
TRPHidden /wp-admin/admin.php?page=trp_remove_duplicate_rows | 7.67 | 58.24 |
TRPHidden /wp-admin/admin.php?page=trp_error_manager | 7.65 | 59.94 |
TRPHidden /wp-admin/admin.php?page=trp_addons_page | 7.50 | 48.01 |
TRPHidden /wp-admin/admin.php?page=trp_machine_translation | 7.50 | 51.41 |
TranslatePress1 /wp-admin/options-general.php?page=translate-press | 7.50 | 55.93 |
Server storage [IO: ▲5.73MB] [DB: ▲0.06MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 328 new files
Database: 3 new tables, 10 new options
New tables |
---|
wp_trp_gettext_original_meta |
wp_trp_gettext_original_strings |
wp_trp_gettext_en_us |
New WordPress options |
---|
widget_recent-comments |
trp_settings |
can_compress_scripts |
db_upgraded |
trp_plugin_version |
widget_theysaidso_widget |
widget_recent-posts |
trp_db_stored_data |
theysaidso_admin_options |
trp_show_error_db_message |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Translate Multilingual sites - TranslatePress
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,865 ▲118 | 14.67 ▲0.32 | 1.88 ▲0.15 | 37.33 ▼2.36 |
Dashboard /wp-admin | 2,228 ▲47 | 5.62 ▼0.09 | 93.96 ▼20.05 | 47.58 ▲4.38 |
Posts /wp-admin/edit.php | 2,130 ▲30 | 2.01 ▲0.07 | 39.64 ▲0.40 | 36.60 ▲3.02 |
Add New Post /wp-admin/post-new.php | 1,579 ▲53 | 23.24 ▲0.04 | 657.64 ▲24.39 | 70.16 ▲12.69 |
Media Library /wp-admin/upload.php | 1,427 ▲30 | 4.12 ▼0.07 | 108.78 ▲7.67 | 52.00 ▲11.19 |
TRPHidden /wp-admin/admin.php?page=trp_advanced_page | 904 | 1.99 | 25.58 | 31.11 |
TRPHidden /wp-admin/admin.php?page=trp_test_machine_api | 888 | 2.09 | 27.75 | 41.94 |
TRPHidden /wp-admin/admin.php?page=trp_optin_page | 907 | 1.99 | 24.01 | 29.24 |
TRPHidden /wp-admin/admin.php?page=trp_license_key | 904 | 1.97 | 25.94 | 33.20 |
TRPHidden /wp-admin/admin.php?page=trp_update_database | 852 | 1.71 | 32.50 | 29.31 |
TRPHidden /wp-admin/admin.php?page=trp_remove_duplicate_rows | 935 | 1.99 | 24.01 | 26.97 |
TRPHidden /wp-admin/admin.php?page=trp_error_manager | 849 | 1.96 | 22.23 | 28.98 |
TRPHidden /wp-admin/admin.php?page=trp_addons_page | 907 | 1.99 | 26.56 | 31.43 |
TRPHidden /wp-admin/admin.php?page=trp_machine_translation | 907 | 2.17 | 25.40 | 31.15 |
TranslatePress1 /wp-admin/options-general.php?page=translate-press | 904 | 1.99 | 23.68 | 28.50 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.06MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- The plugin did not uninstall successfully, leaving 3 tables in the database
- wp_trp_gettext_original_strings
- wp_trp_gettext_original_meta
- wp_trp_gettext_en_us
- This plugin does not fully uninstall, leaving 10 options in the database
- trp_show_error_db_message
- widget_theysaidso_widget
- theysaidso_admin_options
- trp_db_stored_data
- trp_settings
- widget_recent-posts
- trp_plugin_version
- can_compress_scripts
- db_upgraded
- widget_recent-comments
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
- > GET request to /wp-admin/admin.php?page=trp_test_machine_api
- > Notice in wp-content/plugins/translatepress-multilingual/includes/google-translate/class-google-translate-v2-machine-translator.php+18
Undefined index: google-translate-key
SRP 0% 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
Almost there! Just fix the following items
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/translatepress-multilingual/partials/settings-navigation-tabs.php
- 53× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/translatepress-multilingual/includes/google-translate/functions.php:3
- > PHP Fatal error
Uncaught Error: Class 'TRP_Query' not found in wp-content/plugins/translatepress-multilingual/includes/queries/class-gettext-normalization.php:14
- > PHP Warning
Invalid argument supplied for foreach() in wp-content/plugins/translatepress-multilingual/partials/settings-navigation-tabs.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/translatepress-multilingual/includes/advanced-settings/do-not-translate-certain-paths.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/translatepress-multilingual/includes/shortcodes.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/translatepress-multilingual/languages/translatepress-multilingual.catalog.php:1
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/translatepress-multilingual/includes/advanced-settings/exclude-selectors.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/translatepress-multilingual/includes/advanced-settings/custom-date-format.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/translatepress-multilingual/partials/translation-manager.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/translatepress-multilingual/includes/advanced-settings/disable-languages-sitemap.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found
Optimizations
Plugin configuration 90% from 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: translate, automatic translation, bilingual, language, google translate...
translatepress-multilingual/index.php 77% from 13 tests
The principal PHP file in "Translate Multilingual sites - TranslatePress" v. 2.6.7 is loaded by WordPress automatically on each request
It is important to fix the following:
- Requires at least: The required version number did not match the one declared in readme.txt ("3.1.0" instead of "2.5.0")
- Main file name: It is recommended to name the main PHP file as the plugin slug ("translatepress-multilingual.php" instead of "index.php")
- Description: Keep the plugin description shorter than 140 characters (currently 156 characters long)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin32,461 lines of code in 176 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 99 | 4,180 | 5,526 | 19,470 |
JavaScript | 63 | 2,721 | 811 | 10,522 |
CSS | 10 | 429 | 62 | 2,312 |
Markdown | 2 | 24 | 0 | 118 |
JSON | 1 | 0 | 0 | 32 |
SVG | 1 | 1 | 0 | 7 |
PHP code 50% from 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
- Please reduce cyclomatic complexity of methods to less than 100 (currently 154)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.47 |
Average class complexity | 56.10 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 392.00 |
Average method complexity | 4.94 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 154.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 52 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 52 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 728 | |
▷ Static methods | 17 | 2.34% |
▷ Public methods | 659 | 90.52% |
▷ Protected methods | 39 | 5.36% |
▷ Private methods | 30 | 4.12% |
Functions | 297 | |
▷ Named functions | 290 | 97.64% |
▷ Anonymous functions | 7 | 2.36% |
Constants | 52 | |
▷ Global constants | 43 | 82.69% |
▷ Class constants | 9 | 17.31% |
▷ Public constants | 9 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
141 PNG files occupy 0.44MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/flags/haz.png | 0.36KB | 0.33KB | ▼ 9.68% |
assets/images/flags/en_AU.png | 0.56KB | 0.47KB | ▼ 15.96% |
assets/images/flags/es_UY.png | 0.42KB | 0.37KB | ▼ 11.86% |
assets/images/flags/da_DK.png | 0.30KB | 0.22KB | ▼ 24.34% |
assets/images/flags/cy.png | 15.20KB | 0.89KB | ▼ 94.17% |