Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼11.57ms] Passed 4 tests
Server-side resources used by Smartling Connector
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.00 | 31.13 ▼10.20 |
Dashboard /wp-admin | 3.31 ▼0.04 | 45.01 ▼18.19 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 49.45 ▼4.32 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 90.73 ▼13.58 |
Media Library /wp-admin/upload.php | 3.24 ▲0.00 | 34.82 ▲2.62 |
Server storage [IO: ▲6.12MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 1,106 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
widget_recent-comments |
can_compress_scripts |
Browser metrics Passed 4 tests
A check of browser resources used by Smartling Connector
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,790 ▲43 | 14.27 ▼0.24 | 1.66 ▲0.10 | 36.57 ▼6.73 |
Dashboard /wp-admin | 2,198 ▲18 | 5.58 ▼0.17 | 92.60 ▼5.22 | 41.67 ▼4.53 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.00 ▲0.00 | 39.65 ▼0.34 | 35.78 ▼2.98 |
Add New Post /wp-admin/post-new.php | 1,526 ▼23 | 23.26 ▲3.97 | 665.61 ▲11.18 | 50.39 ▼23.59 |
Media Library /wp-admin/upload.php | 1,397 ▼3 | 4.30 ▲0.07 | 95.03 ▼6.05 | 40.64 ▼5.02 |
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
The following items require your attention
- The uninstall procedure has failed, leaving 6 options in the database
- widget_theysaidso_widget
- can_compress_scripts
- db_upgraded
- widget_recent-comments
- widget_recent-posts
- theysaidso_admin_options
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test
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
Please fix the following
- 9× PHP files output text when accessed directly:
- > /wp-content/plugins/smartling-connector/inc/lib/smartling-connector-smartling/api-sdk-php/examples/context-example.php
- > /wp-content/plugins/smartling-connector/inc/lib/smartling-connector-symfony/expression-language/Resources/bin/generate_operator_regex.php
- > /wp-content/plugins/smartling-connector/inc/lib/smartling-connector-smartling/api-sdk-php/examples/jobs-example.php
- > /wp-content/plugins/smartling-connector/inc/lib/smartling-connector-smartling/api-sdk-php/examples/project-example.php
- > /wp-content/plugins/smartling-connector/inc/lib/smartling-connector-smartling/api-sdk-php/examples/translation-requests-example.php
- > /wp-content/plugins/smartling-connector/inc/lib/smartling-connector-smartling/api-sdk-php/examples/batch-example.php
- > /wp-content/plugins/smartling-connector/inc/lib/smartling-connector-smartling/api-sdk-php/examples/file-example.php
- > /wp-content/plugins/smartling-connector/inc/lib/smartling-connector-smartling/api-sdk-php/examples/audit-log-example.php
- > /wp-content/plugins/smartling-connector/inc/lib/smartling-connector-smartling/api-sdk-php/examples/progress-tracker-example.php
- 611× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Interface 'Smartling\\Vendor\\Symfony\\Component\\Config\\Definition\\Builder\odeParentInterface' not found in wp-content/plugins/smartling-connector/inc/lib/smartling-connector-symfony/config/Definition/Builder/NodeDefinition.php:21
- > PHP Fatal error
Uncaught Error: Class 'Smartling\\Vendor\\Symfony\\Component\\DependencyInjection\\ParameterBag\\ParameterBag' not found in wp-content/plugins/smartling-connector/inc/lib/smartling-connector-symfony/dependency-injection/ParameterBag/FrozenParameterBag.php:20
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/smartling-connector/inc/Smartling/WP/View/SubmissionsPage.php:11
- > PHP Fatal error
Trait 'Smartling\\DebugTrait' not found in wp-content/plugins/smartling-connector/inc/Smartling/Bootstrap.php on line 35
- > PHP Fatal error
Uncaught Error: Interface 'Smartling\\Vendor\\Symfony\\Component\\DependencyInjection\\Exception\\ExceptionInterface' not found in wp-content/plugins/smartling-connector/inc/lib/smartling-connector-symfony/dependency-injection/Exception/LogicException.php:17
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/smartling-connector/inc/lib/smartling-connector-smartling/api-sdk-php/tests/unit/ApiTestAbstract.php:14
- > PHP Fatal error
Uncaught Error: Class 'Smartling\\Vendor\\Monolog\\Handler\\AbstractHandler' not found in wp-content/plugins/smartling-connector/inc/lib/smartling-connector-monolog/monolog/src/Monolog/Handler/BufferHandler.php:25
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/smartling-connector/inc/lib/smartling-connector-symfony/config/Tests/Definition/Builder/TreeBuilderTest.php:18
- > PHP Fatal error
Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/smartling-connector/inc/Smartling/WP/Table/LocalizationRulesTableWidget.php:9
- > PHP Fatal error
Uncaught Error: Interface 'Smartling\\Vendor\\Symfony\\Component\\DependencyInjection\\Dumper\\DumperInterface' not found in wp-content/plugins/smartling-connector/inc/lib/smartling-connector-symfony/dependency-injection/Dumper/Dumper.php:20
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
10 plugin tags: internationalization, multilingual, localisation, automation, international...
smartling-connector/smartling-connector.php Passed 13 tests
"Smartling Connector" version 3.8.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
94 characters long description:
Integrate your WordPress site with Smartling to upload your content and download translations.
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
No dangerous file extensions were detected107,822 lines of code in 1,066 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 928 | 15,723 | 28,705 | 89,705 |
JavaScript | 19 | 965 | 401 | 5,425 |
Markdown | 33 | 1,441 | 0 | 4,450 |
YAML | 43 | 279 | 118 | 4,124 |
JSON | 20 | 0 | 0 | 1,923 |
CSS | 5 | 155 | 53 | 1,684 |
XML | 12 | 22 | 5 | 226 |
XSD | 2 | 23 | 0 | 197 |
PO File | 1 | 19 | 19 | 54 |
HTML | 1 | 0 | 0 | 15 |
Dockerfile | 1 | 8 | 0 | 10 |
make | 1 | 4 | 0 | 9 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
- Please reduce cyclomatic complexity of methods to less than 100 (currently 179)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
Average class complexity | 9.85 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 244.00 |
Average method complexity | 2.41 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 179.00 |
Code structure | ||
---|---|---|
Namespaces | 132 | |
Interfaces | 88 | |
Traits | 21 | |
Classes | 756 | |
▷ Abstract classes | 41 | 5.42% |
▷ Concrete classes | 715 | 94.58% |
▷ Final classes | 24 | 3.36% |
Methods | 5,464 | |
▷ Static methods | 555 | 10.16% |
▷ Public methods | 4,377 | 80.11% |
▷ Protected methods | 371 | 6.79% |
▷ Private methods | 716 | 13.10% |
Functions | 387 | |
▷ Named functions | 132 | 34.11% |
▷ Anonymous functions | 255 | 65.89% |
Constants | 699 | |
▷ Global constants | 79 | 11.30% |
▷ Class constants | 620 | 88.70% |
▷ Public constants | 543 | 87.58% |
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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
inc/lib/smartling-connector-smartling/api-sdk-php/tests/resources/test.png | 10.52KB | 4.86KB | ▼ 53.81% |