Benchmarks
Plugin footprint 83% 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: ▲0.65MB] [CPU: ▼0.73ms] Passed 4 tests
A check of server-side resources used by Text Domain Inspector
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.13 ▲0.67 | 41.74 ▲2.51 |
Dashboard /wp-admin | 4.00 ▲0.69 | 55.29 ▲2.17 |
Posts /wp-admin/edit.php | 4.05 ▲0.69 | 56.82 ▲8.23 |
Add New Post /wp-admin/post-new.php | 6.52 ▲0.63 | 90.29 ▼12.08 |
Media Library /wp-admin/upload.php | 3.86 ▲0.63 | 42.26 ▲4.48 |
Server storage [IO: ▲0.46MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 48 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
theysaidso_admin_options |
widget_recent-posts |
db_upgraded |
widget_theysaidso_widget |
can_compress_scripts |
Browser metrics Passed 4 tests
Text Domain Inspector: an overview of browser usage
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,815 ▲69 | 13.28 ▼1.03 | 1.59 ▼0.35 | 38.29 ▼9.45 |
Dashboard /wp-admin | 2,218 ▲30 | 4.91 ▼0.99 | 106.56 ▲3.15 | 39.44 ▼4.83 |
Posts /wp-admin/edit.php | 2,095 ▲6 | 2.04 ▼0.01 | 37.00 ▼1.34 | 34.38 ▼0.97 |
Add New Post /wp-admin/post-new.php | 1,541 ▲27 | 22.98 ▲5.46 | 655.33 ▼22.38 | 51.59 ▼5.72 |
Media Library /wp-admin/upload.php | 1,397 ▲6 | 4.41 ▲0.24 | 110.33 ▼31.15 | 46.69 ▼5.80 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
- Zombie WordPress options were found after uninstall: 6 options
- db_upgraded
- widget_recent-comments
- theysaidso_admin_options
- can_compress_scripts
- widget_theysaidso_widget
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 2× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/text-domain-inspector/html5lib-php/maintenance/scrape-ncr.php
- > /wp-content/plugins/text-domain-inspector/tests/bootstrap.php
- 27× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Warning
require_once(simpletest/autorun.php): failed to open stream: No such file or directory in wp-content/plugins/text-domain-inspector/html5lib-php/tests/autorun.php on line 89
- > PHP Fatal error
require_once(): Failed opening required 'simpletest/autorun.php' (include_path='.:/usr/share/php:wp-content/plugins/text-domain-inspector/html5lib-php/tests:/var/www/wordpress/wp-content/plugins/text-domain-inspector/html5lib-php/tests/../library') in /var/www/wordpress/wp-content/plugins/text-domain-inspector/html5lib-php/tests/autorun.php on line 89
- > PHP Warning
require_once(simpletest/autorun.php): failed to open stream: No such file or directory in wp-content/plugins/text-domain-inspector/html5lib-php/tests/autorun.php on line 89
- > PHP Fatal error
Uncaught Error: Class 'SimpleTest' not found in wp-content/plugins/text-domain-inspector/html5lib-php/tests/HTML5/TestDataHarness.php:3
- > PHP Fatal error
Uncaught Error: Class 'HTML5_Tokenizer' not found in wp-content/plugins/text-domain-inspector/html5lib-php/tests/HTML5/TestableTokenizer.php:3
- > PHP Warning
require_once(simpletest/autorun.php): failed to open stream: No such file or directory in wp-content/plugins/text-domain-inspector/html5lib-php/tests/autorun.php on line 89
- > PHP Fatal error
require_once(): Failed opening required 'simpletest/autorun.php' (include_path='.:/usr/share/php:wp-content/plugins/text-domain-inspector/html5lib-php/tests:/var/www/wordpress/wp-content/plugins/text-domain-inspector/html5lib-php/tests/../library') in /var/www/wordpress/wp-content/plugins/text-domain-inspector/html5lib-php/tests/autorun.php on line 89
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/text-domain-inspector/text-domain-inspector.php on line 12
- > PHP Fatal error
require_once(): Failed opening required 'simpletest/autorun.php' (include_path='.:/usr/share/php:wp-content/plugins/text-domain-inspector/html5lib-php/tests:/var/www/wordpress/wp-content/plugins/text-domain-inspector/html5lib-php/tests/../library') in /var/www/wordpress/wp-content/plugins/text-domain-inspector/html5lib-php/tests/autorun.php on line 89
- > PHP Fatal error
require_once(): Failed opening required 'ABSPATHwp-includes/pluggable.php' (include_path='.:/usr/share/php') in wp-content/plugins/text-domain-inspector/text-domain-inspector.php on line 12
- > PHP Warning
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 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
5 plugin tags: inspector, domain, text, translation, text-domain
text-domain-inspector/text-domain-inspector.php Passed 13 tests
"Text Domain Inspector" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
66 characters long description:
This plugin allows to inspect text domains of translatable strings
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin5,062 lines of code in 39 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 27 | 1,031 | 2,260 | 4,833 |
Bourne Shell | 1 | 21 | 11 | 120 |
HTML | 6 | 0 | 0 | 69 |
XML | 2 | 4 | 2 | 26 |
JSON | 3 | 0 | 0 | 14 |
PHP code 50% from 2 tests
A short review of cyclomatic complexity and code structure
It is recommended to fix the following
- Method cyclomatic complexity has to be reduced to less than 100 (currently 639)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.59 |
Average class complexity | 51.17 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 748.00 |
Average method complexity | 9.16 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 639.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 24 | |
▷ Abstract classes | 4 | 16.67% |
▷ Concrete classes | 20 | 83.33% |
▷ Final classes | 0 | 0.00% |
Methods | 154 | |
▷ Static methods | 12 | 7.79% |
▷ Public methods | 113 | 73.38% |
▷ Protected methods | 17 | 11.04% |
▷ Private methods | 24 | 15.58% |
Functions | 14 | |
▷ Named functions | 9 | 64.29% |
▷ Anonymous functions | 5 | 35.71% |
Constants | 61 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 61 | 100.00% |
▷ Public constants | 61 | 100.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
No PNG images were found in this plugin