78% translation-connectors

Code Review | Translation connectors

WordPress plugin Translation connectors scored 78% from 54 tests.

About plugin

  • Plugin page: translation-conne...
  • Plugin version: 2.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.2.2
  • WordPress version: 6.3.1
  • First release: Sep 1, 2017
  • Latest release: Mar 22, 2021
  • Number of updates: 65
  • Update frequency: every 20.2 days
  • Top authors: smartcatai (96.92%)in7rude (4.62%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 3,054 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.89ms] Passed 4 tests

This is a short check of server-side resources used by Translation connectors
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.85 ▲0.49
Dashboard /wp-admin3.31 ▲0.0048.16 ▼1.06
Posts /wp-admin/edit.php3.36 ▲0.0046.42 ▲0.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.79 ▼11.27
Media Library /wp-admin/upload.php3.23 ▲0.0034.58 ▲1.42

Server storage [IO: ▲2.72MB] [DB: ▲0.00MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 931 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Translation connectors
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9014.74 ▲0.511.85 ▲0.2243.89 ▼1.31
Dashboard /wp-admin2,206 ▲185.83 ▼0.04116.38 ▲12.4244.58 ▲1.14
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0433.49 ▼0.4032.98 ▲1.12
Add New Post /wp-admin/post-new.php1,514 ▼1917.64 ▼5.34680.22 ▲20.1564.10 ▲12.98
Media Library /wp-admin/upload.php1,388 ▲64.15 ▼0.0592.52 ▼9.2445.40 ▼0.30

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/translation-connectors/inc/vendor/mustache/mustache/bin/build_bootstrap.php
  • 509× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Discovery\\ClassDiscovery' not found in wp-content/plugins/translation-connectors/inc/vendor/php-http/discovery/src/UriFactoryDiscovery.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\OptionsResolver\\Exception\\ExceptionInterface' not found in wp-content/plugins/translation-connectors/inc/vendor/symfony/options-resolver/Exception/AccessException.php:20
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Client\\HttpClient' not found in wp-content/plugins/translation-connectors/inc/vendor/php-http/client-common/src/BatchClient.php:18
    • > PHP Fatal error
      Uncaught Error: Interface 'Mustache_Exception' not found in wp-content/plugins/translation-connectors/inc/vendor/mustache/mustache/src/Mustache/Exception/RuntimeException.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Serializer\\Encoder\\EncoderInterface' not found in wp-content/plugins/translation-connectors/inc/vendor/symfony/serializer/Encoder/ContextAwareEncoderInterface.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\DependencyInjection\\Loader\\FileLoader' not found in wp-content/plugins/translation-connectors/inc/vendor/symfony/dependency-injection/Loader/DirectoryLoader.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Client\\Common\\Plugin' not found in wp-content/plugins/translation-connectors/inc/vendor/php-http/client-common/src/Plugin/HeaderSetPlugin.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'SmartCat\\Client\\Resource\\Resource' not found in wp-content/plugins/translation-connectors/inc/vendor/smartcat/smartcat-api/src/SmartCAT/API/Resource/TranslationMemoriesResource.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Config\\Definition\odeInterface' not found in wp-content/plugins/translation-connectors/inc/vendor/symfony/config/Definition/PrototypeNodeInterface.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\DependencyInjection\\Exception\\InvalidArgumentException' not found in wp-content/plugins/translation-connectors/inc/vendor/symfony/dependency-injection/Exception/ServiceNotFoundException.php:21

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: bilingual, translation, translators, l10n, i18n...

translation-connectors/translation-connectors.php Passed 13 tests

"Translation connectors" version 2.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
48 characters long description:
WordPress integration to translation connectors.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin52,219 lines of code in 890 files:
LanguageFilesBlank linesComment linesLines of code
PHP7879,96027,29944,654
Markdown421,46703,246
JSON28102,475
PO File1204205421
JavaScript15814360
XSD2340310
HTML12143223
XML8210198
YAML8425192
CSS1349140

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 112)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity9.37
▷ Minimum class complexity1.00
▷ Maximum class complexity433.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity112.00
Code structure
Namespaces100
Interfaces103
Traits42
Classes626
▷ Abstract classes314.95%
▷ Concrete classes59595.05%
▷ Final classes8614.45%
Methods3,662
▷ Static methods2446.66%
▷ Public methods3,03982.99%
▷ Protected methods2125.79%
▷ Private methods41111.22%
Functions160
▷ Named functions4628.75%
▷ Anonymous functions11471.25%
Constants170
▷ Global constants52.94%
▷ Class constants16597.06%
▷ Public constants165100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/dashicon.png0.43KB0.29KB▼ 33.03%