Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.03MB] [CPU: ▼4.54ms] Passed 4 tests
Server-side resources used by Comment Translator
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 40.59 ▼3.06 |
Dashboard /wp-admin | 3.33 ▲0.03 | 48.11 ▲0.74 |
Posts /wp-admin/edit.php | 3.45 ▲0.09 | 46.41 ▼2.25 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.03 | 81.24 ▼13.59 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 37.80 ▲5.92 |
Comment Translator /wp-admin/tools.php?page=pct_setting | 3.32 | 34.35 |
Server storage [IO: ▲0.12MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-posts |
widget_theysaidso_widget |
widget_recent-comments |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Comment Translator
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,806 ▲60 | 13.35 ▼1.03 | 1.70 ▼0.30 | 47.61 ▲9.32 |
Dashboard /wp-admin | 2,212 ▲24 | 5.83 ▼0.09 | 94.15 ▼15.79 | 38.91 ▼2.70 |
Posts /wp-admin/edit.php | 2,095 ▲6 | 1.99 ▲0.00 | 36.02 ▼4.53 | 32.93 ▼4.93 |
Add New Post /wp-admin/post-new.php | 1,534 ▲20 | 23.22 ▲5.66 | 672.29 ▲2.75 | 56.32 ▼3.42 |
Media Library /wp-admin/upload.php | 1,404 ▲16 | 4.31 ▲0.13 | 101.05 ▼9.16 | 45.00 ▼1.83 |
Comment Translator /wp-admin/tools.php?page=pct_setting | 997 | 2.06 | 32.96 | 29.06 |
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
These items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- widget_recent-comments
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
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
Please take a closer look at the following
- 16× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'phpapp_Option_Model' not found in wp-content/plugins/comment-translator/app/components/yandex_translate/pct_Yandex_Translate_Model.php:6
- > PHP Fatal error
Uncaught Error: Call to undefined function pct_instance() in wp-content/plugins/comment-translator/app/components/pct_Yandex_Translate.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function pct_instance() in wp-content/plugins/comment-translator/app/components/pct_Google_Translate.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/comment-translator/comment_translator.php:242
- > PHP Fatal error
Uncaught Error: Class 'phpapp_Model' not found in wp-content/plugins/comment-translator/vendors/phpapp_Option_Model.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/comment-translator/app/views/settings.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/comment-translator/app/controllers/pct_Setting_Controller.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function pct_instance() in wp-content/plugins/comment-translator/app/views/picker/dropdown.php:5
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/comment-translator/app/controllers/pct_Translate_Controller.php:9
- > PHP Fatal error
Uncaught Error: Call to undefined function pct_instance() in wp-content/plugins/comment-translator/app/views/picker/link.php:1
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
- Contributors: Plugin contributors field is missing
- Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line (
=== comment-translator ===
)
comment-translator/comment_translator.php 92% from 13 tests
"Comment Translator" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("comment-translator.php" instead of "comment_translator.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,849 lines of code in 22 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 20 | 215 | 170 | 1,781 |
CSS | 2 | 10 | 3 | 68 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 10.25 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 66.00 |
Average method complexity | 2.51 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 28.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 16 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 16 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 98 | |
▷ Static methods | 11 | 11.22% |
▷ Public methods | 94 | 95.92% |
▷ Protected methods | 1 | 1.02% |
▷ Private methods | 3 | 3.06% |
Functions | 5 | |
▷ Named functions | 5 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-1.png | 52.42KB | 25.64KB | ▼ 51.09% |
assets/screenshot-2.png | 9.89KB | 5.50KB | ▼ 44.39% |