Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully
Server metrics [RAM: ▼1.85MB] [CPU: ▼44.72ms] Passed 4 tests
A check of server-side resources used by Translator with Baidu Service
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.08 ▼1.39 | 4.98 ▼36.96 |
Dashboard /wp-admin | 2.17 ▼1.13 | 9.40 ▼35.98 |
Posts /wp-admin/edit.php | 2.18 ▼1.18 | 8.02 ▼35.15 |
Add New Post /wp-admin/post-new.php | 2.17 ▼3.71 | 9.22 ▼70.80 |
Media Library /wp-admin/upload.php | 2.18 ▼1.05 | 7.73 ▼26.58 |
BD Translator /wp-admin/options-general.php?page=baidu-translator | 2.18 | 8.48 |
Server storage [IO: ▲0.35MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 137 new files
Database: no new tables, 8 new options
New WordPress options |
---|
baidu_translator |
widget_recent-posts |
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
widget_baidu-translator |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by Translator with Baidu Service
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,804 ▲58 | 13.73 ▼0.59 | 1.76 ▼0.01 | 39.15 ▼6.16 |
Dashboard /wp-admin | 2,207 ▲19 | 5.81 ▲0.91 | 103.39 ▲0.14 | 38.33 ▼0.66 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.03 ▲0.02 | 39.19 ▲4.08 | 35.64 ▲3.25 |
Add New Post /wp-admin/post-new.php | 1,538 ▼4 | 23.16 ▲5.06 | 663.19 ▼1.25 | 51.04 ▼4.47 |
Media Library /wp-admin/upload.php | 1,395 ▲13 | 4.19 ▼0.00 | 93.59 ▼4.49 | 40.64 ▼1.58 |
BD Translator /wp-admin/options-general.php?page=baidu-translator | 1,038 | 2.07 | 23.61 | 60.78 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/translator-with-baidu-service/includes/baidu-translate-proxy.php+39
Undefined index: option
- Zombie WordPress options were found after uninstall: 7 options
- db_upgraded
- widget_baidu-translator
- widget_theysaidso_widget
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
- 2 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=baidu-translator
- > Notice in wp-content/plugins/translator-with-baidu-service/includes/baidu-translate-proxy.php+41
Undefined index: option
SRP 50% 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
Almost there! Just fix the following items
- 5× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/translator-with-baidu-service/admin/views/screen-settings.php:3
- > PHP Notice
Undefined index: option in wp-content/plugins/translator-with-baidu-service/includes/baidu-translate-proxy.php on line 41
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/translator-with-baidu-service/baidu-translator.php:37
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/translator-with-baidu-service/includes/class-baidu-translator-widget.php:3
- > PHP Notice
Undefined index: option in wp-content/plugins/translator-with-baidu-service/includes/baidu-translate-proxy.php on line 39
- > 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 93% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: translation, cantonese, i18n, translator, localization...
translator-with-baidu-service/baidu-translator.php 85% from 13 tests
"Translator with Baidu Service" version 1.10's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("translator-with-baidu-service.php" instead of "baidu-translator.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected1,530 lines of code in 20 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 11 | 122 | 51 | 669 |
JavaScript | 6 | 114 | 28 | 652 |
CSS | 2 | 20 | 0 | 109 |
PO File | 1 | 32 | 39 | 100 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 9.33 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 20.00 |
Average method complexity | 2.14 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 14.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 44 | |
▷ Static methods | 1 | 2.27% |
▷ Public methods | 43 | 97.73% |
▷ Protected methods | 1 | 2.27% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
113 PNG files occupy 0.13MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/img/pt-br.png | 1.22KB | 0.89KB | ▼ 27.44% |
includes/img/rom.png | 0.72KB | 0.57KB | ▼ 21.86% |
includes/img/en-us.png | 1.10KB | 1.08KB | ▼ 2.48% |
includes/img/si.png | 1.16KB | 1.08KB | ▼ 7.32% |
includes/img/kk.png | 1.00KB | 0.76KB | ▼ 24.14% |