Benchmarks
Plugin footprint Passed 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.11MB] [CPU: ▼289.03ms] 75% from 4 tests
A check of server-side resources used by Loco Translate
Please have a look at the following items
- CPU: Try to keep total CPU usage under 500.00ms (currently 624.25ms on /wp-admin/admin.php?page=loco)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.65 ▲0.13 | 61.23 ▲8.70 |
Dashboard /wp-admin | 3.56 ▲0.15 | 42.96 ▲5.89 |
Posts /wp-admin/edit.php | 3.78 ▲0.14 | 43.33 ▲1.56 |
Add New Post /wp-admin/post-new.php | 7.02 ▲0.05 | 95.94 ▼1,158.01 |
Media Library /wp-admin/upload.php | 3.44 ▲0.14 | 26.23 ▼5.56 |
Home /wp-admin/admin.php?page=loco | 4.90 | 624.25 |
Themes /wp-admin/admin.php?page=loco-theme | 4.51 | 37.30 |
Plugins /wp-admin/admin.php?page=loco-plugin | 4.43 | 34.84 |
Settings /wp-admin/admin.php?page=loco-config | 3.91 | 29.96 |
Languages /wp-admin/admin.php?page=loco-lang | 4.79 | 42.55 |
WordPress /wp-admin/admin.php?page=loco-core | 3.76 | 25.46 |
Server storage [IO: ▲1.39MB] [DB: ▲0.05MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 294 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
This is an overview of browser requirements for Loco Translate
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,817 ▲73 | 16.22 ▲0.22 | 6.36 ▲0.48 | 2.08 ▲0.11 |
Dashboard /wp-admin | 2,946 ▲88 | 6.15 ▲0.07 | 117.64 ▼20.80 | 153.79 ▼8.64 |
Posts /wp-admin/edit.php | 2,746 ▲52 | 3.25 ▲0.02 | 62.79 ▼1.36 | 133.94 ▼5.25 |
Add New Post /wp-admin/post-new.php | 1,695 ▲34 | 16.06 ▼0.53 | 420.86 ▲0.12 | 150.66 ▼6.09 |
Media Library /wp-admin/upload.php | 1,746 ▲48 | 5.51 ▲0.03 | 144.87 ▲3.60 | 185.23 ▲1.00 |
Home /wp-admin/admin.php?page=loco | 1,071 | 3.07 | 29.69 | 107.18 |
Themes /wp-admin/admin.php?page=loco-theme | 1,053 | 3.09 | 36.10 | 82.15 |
Plugins /wp-admin/admin.php?page=loco-plugin | 1,028 | 3.08 | 27.38 | 87.58 |
Settings /wp-admin/admin.php?page=loco-config | 1,447 | 3.10 | 26.39 | 107.26 |
Languages /wp-admin/admin.php?page=loco-lang | 1,010 | 3.09 | 27.15 | 119.63 |
WordPress /wp-admin/admin.php?page=loco-core | 1,146 | 3.08 | 27.75 | 138.10 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.05MB] Passed 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstaller ran successfully
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
- 7× PHP files output text when accessed directly:
- > /wp-content/plugins/loco-translate/tpl/admin/help/tab-home.php
- > /wp-content/plugins/loco-translate/tpl/admin/help/tab-list-locales.php
- > /wp-content/plugins/loco-translate/tpl/admin/help/tab-locale-view.php
- > /wp-content/plugins/loco-translate/tpl/admin/help/tab-bundle-view.php
- > /wp-content/plugins/loco-translate/tpl/admin/help/tab-file-view.php
- > /wp-content/plugins/loco-translate/tpl/admin/help/tab-list-bundles.php
- > /wp-content/plugins/loco-translate/tpl/debug/dump.php
- 186× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Notice
Undefined variable: params in wp-content/plugins/loco-translate/tpl/debug/dump.php on line 9
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/loco-translate/tpl/admin/file/edit-po.php:5
- > PHP Fatal error
Uncaught Error: Class 'Loco_error_Exception' not found in wp-content/plugins/loco-translate/src/error/Notice.php:6
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/loco-translate/tpl/admin/bundle/setup/author.php:5
- > PHP Fatal error
Uncaught Error: Class 'Loco_admin_bundle_BaseController' not found in wp-content/plugins/loco-translate/src/admin/init/InitPotController.php:5
- > PHP Fatal error
Uncaught Error: Class 'Loco_admin_list_BaseController' not found in wp-content/plugins/loco-translate/src/admin/list/PluginsController.php:6
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/loco-translate/tpl/admin/errors/no-backups.php:5
- > PHP Fatal error
Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/loco-translate/src/test/WordPressTestCase.php:5
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/loco-translate/tpl/admin/bundle/debug.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function loco_require_lib() in wp-content/plugins/loco-translate/src/gettext/Metadata.php:3
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 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
These attributes need your attention:
- Tags: There are too many tags (12 tag instead of maximum 10)
loco-translate/loco.php 92% from 13 tests
The primary PHP file in "Loco Translate" version 2.6.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("loco-translate.php" instead of "loco.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
Good job! No executable or dangerous file extensions detected21,661 lines of code in 271 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 238 | 3,538 | 7,785 | 15,862 |
JavaScript | 13 | 9 | 0 | 5,642 |
SVG | 1 | 0 | 0 | 113 |
XML | 1 | 0 | 0 | 24 |
CSS | 17 | 0 | 0 | 17 |
Markdown | 1 | 2 | 0 | 3 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.41 |
Average class complexity | 15.61 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 90.00 |
Average method complexity | 3.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 46.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 3 | |
Traits | 0 | |
Classes | 180 | |
▷ Abstract classes | 33 | 18.33% |
▷ Concrete classes | 147 | 81.67% |
▷ Final classes | 0 | 0.00% |
Methods | 1,280 | |
▷ Static methods | 149 | 11.64% |
▷ Public methods | 1,104 | 86.25% |
▷ Protected methods | 50 | 3.91% |
▷ Private methods | 126 | 9.84% |
Functions | 40 | |
▷ Named functions | 40 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 19 | |
▷ Global constants | 11 | 57.89% |
▷ Class constants | 8 | 42.11% |
▷ Public constants | 8 | 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
6 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
pub/img/api/deepl.png | 1.39KB | 1.83KB | 0.00% |
pub/img/flags.png | 22.53KB | 23.96KB | 0.00% |
pub/img/api/microsoft.png | 1.60KB | 2.06KB | 0.00% |
pub/img/wg/splity.png | 0.09KB | 0.09KB | 0.00% |
pub/img/api/google.png | 2.22KB | 1.97KB | ▼ 11.59% |