74% translation-tools

Code Review | Translation Tools

WordPress plugin Translation Tools scored74%from 54 tests.

About plugin

  • Plugin page: translation-tools
  • Plugin version: 1.6.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Jun 11, 2020
  • Latest release: Aug 15, 2023
  • Number of updates: 67
  • Update frequency: every 17.3 days
  • Top authors: pedromendonca (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

80+ active /4,106 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲1.94MB] [CPU: ▲8.29ms] Passed 4 tests

This is a short check of server-side resources used by Translation Tools
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /5.40 ▲1.8959.00 ▲15.21
Dashboard /wp-admin5.30 ▲1.9556.41 ▼1.63
Posts /wp-admin/edit.php5.36 ▲1.9665.08 ▲16.12
Add New Post /wp-admin/post-new.php7.89 ▲1.96100.95 ▲6.25
Media Library /wp-admin/upload.php5.23 ▲1.9650.40 ▲13.32

Server storage [IO: ▲0.78MB] [DB: ▲0.05MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for Translation Tools
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,190 ▲42914.38 ▲0.031.75 ▼0.3143.20 ▼0.21
Dashboard /wp-admin2,198 ▲205.63 ▼0.0188.12 ▼21.6239.08 ▼0.86
Posts /wp-admin/edit.php2,100 ▼31.97 ▼0.0337.79 ▼5.9330.48 ▼5.36
Add New Post /wp-admin/post-new.php1,526 ▼023.31 ▲0.31676.70 ▲34.1964.29 ▲9.62
Media Library /wp-admin/upload.php1,400 ▼04.17 ▼0.0096.27 ▼12.0642.45 ▼1.11

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% 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)
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 44× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Generators\\Generator' not found in wp-content/plugins/translation-tools/vendor/gettext/gettext/src/Generators/CsvDictionary.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Generators\\Generator' not found in wp-content/plugins/translation-tools/vendor/gettext/gettext/src/Generators/YamlDictionary.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Extractors\\Extractor' not found in wp-content/plugins/translation-tools/vendor/gettext/gettext/src/Extractors/Twig.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Extractors\\Extractor' not found in wp-content/plugins/translation-tools/vendor/gettext/gettext/src/Extractors/Jed.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Extractors\\Extractor' not found in wp-content/plugins/translation-tools/vendor/gettext/gettext/src/Extractors/YamlDictionary.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Languages\\Exporter\\Exporter' not found in wp-content/plugins/translation-tools/vendor/gettext/languages/src/Exporter/Php.php:5
    • > PHP Fatal error
      Trait 'Gettext\\Utils\\HeadersGeneratorTrait' not found in wp-content/plugins/translation-tools/vendor/gettext/gettext/src/Utils/MultidimensionalArrayTrait.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Extractors\\Extractor' not found in wp-content/plugins/translation-tools/vendor/gettext/gettext/src/Extractors/Po.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Gettext\\Languages\\Exporter\\Html' not found in wp-content/plugins/translation-tools/vendor/gettext/languages/src/Exporter/Docs.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Gettext\\TranslatorInterface' not found in wp-content/plugins/translation-tools/vendor/gettext/gettext/src/BaseTranslator.php:5

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: language packs, translation, localization, internationalization, core

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

The main file in "Translation Tools" v. 1.6.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
45 characters long description:
Translation tools for your WordPress install.

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Please fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/translation-tools/vendor/gettext/languages/bin/export-plural-rules.bat
14,071 lines of code in 124 files:
LanguageFilesBlank linesComment linesLines of code
PHP1022,4284,3749,903
JSON5002,337
PO File75369471,405
Markdown2420185
JavaScript452104147
XML3373493
DOS Batch1001

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity12.53
▷ Minimum class complexity1.00
▷ Maximum class complexity75.00
Average method complexity3.51
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces9
Interfaces4
Traits5
Classes80
▷ Abstract classes67.50%
▷ Concrete classes7492.50%
▷ Final classes11.35%
Methods406
▷ Static methods19247.29%
▷ Public methods33682.76%
▷ Protected methods5613.79%
▷ Private methods143.45%
Functions25
▷ Named functions1144.00%
▷ Anonymous functions1456.00%
Constants34
▷ Global constants617.65%
▷ Class constants2882.35%
▷ Public constants28100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin