10% gtbabel

Code Review | Gtbabel

WordPress plugin Gtbabel scored10%from 54 tests.

About plugin

  • Plugin page: gtbabel
  • Plugin version: 6.6.5
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3.2-6.0.3
  • WordPress version: 6.3.1
  • First release: Mar 14, 2020
  • Latest release: Feb 24, 2023
  • Number of updates: 295
  • Update frequency: every 3.7 days
  • Top authors: vielhuber (89.15%)gtbabel (11.19%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,521 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > User error in wp-content/plugins/gtbabel/vendor/composer/platform_check.php+24
    Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.16.

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

Server-side resources used by Gtbabel
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0042.06 ▼4.70
Dashboard /wp-admin3.31 ▲0.0045.03 ▼3.89
Posts /wp-admin/edit.php3.36 ▲0.0046.61 ▲0.13
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.41 ▲1.40
Media Library /wp-admin/upload.php3.23 ▲0.0039.01 ▲3.83

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 1,306 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Gtbabel: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▼0.431.87 ▲0.1449.61 ▲3.31
Dashboard /wp-admin2,198 ▲245.51 ▼0.1385.07 ▼10.8338.64 ▼7.96
Posts /wp-admin/edit.php2,097 ▼32.01 ▲0.0240.02 ▲2.3333.59 ▲2.62
Add New Post /wp-admin/post-new.php1,526 ▼1222.98 ▲4.72623.91 ▼24.0850.10 ▼22.26
Media Library /wp-admin/upload.php1,403 ▲34.30 ▲0.15105.72 ▲11.2946.15 ▲5.73

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • 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
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/gtbabel/vendor/markbaker/matrix/buildPhar.php
    • > /wp-content/plugins/gtbabel/vendor/vielhuber/stringhelper/tests/Helper.php
  • 521× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'ScopedGtbabel\\Dotenv\\Exception\\ExceptionInterface' not found in wp-content/plugins/gtbabel/vendor/vlucas/phpdotenv/src/Exception/InvalidPathException.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ScopedGtbabel\\PhpOffice\\PhpSpreadsheet\\Shared\\Trend\\BestFit' not found in wp-content/plugins/gtbabel/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Shared/Trend/ExponentialBestFit.php:5
    • > PHP Fatal error
      Trait 'ScopedGtbabel\\PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/gtbabel/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Angle.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'ScopedGtbabel\\PhpOffice\\PhpSpreadsheet\\Writer\\Xlsx\\WriterPart' not found in wp-content/plugins/gtbabel/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/ContentTypes.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ScopedGtbabel\\PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/gtbabel/vendor/maennchen/zipstream-php/test/BigintTest.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'ScopedGtbabel\\Dotenv\\Repository\\Adapter\\AdapterInterface' not found in wp-content/plugins/gtbabel/vendor/vlucas/phpdotenv/src/Repository/Adapter/EnvConstAdapter.php:8
    • > PHP Fatal error
      Trait 'ScopedGtbabel\\PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/gtbabel/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Exp.php on line 7
    • > PHP Fatal error
      Trait 'ScopedGtbabel\\PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/gtbabel/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Days.php on line 10
    • > PHP Fatal error
      Trait 'ScopedGtbabel\\PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/gtbabel/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Distributions/Fisher.php on line 8
    • > PHP Fatal error
      Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.0". You are running 7.4.16. in wp-content/plugins/gtbabel/vendor/composer/platform_check.php on line 24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Backend settings), #2 (Setup wizard)
You can look at the official readme.txt

gtbabel/gtbabel.php Passed 13 tests

This is the main PHP file of "Gtbabel" version 6.6.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
44 characters long description:
Instant server-side translation of any page.

Code Analysis 0% 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
It is important to fix the following items
  • For security reasons, never distribute binary or executable files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/gtbabel/vendor/bin/export-plural-rules.bat
      • wp-content/plugins/gtbabel/vendor/gettext/languages/bin/export-plural-rules.bat
122,402 lines of code in 1,079 files:
LanguageFilesBlank linesComment linesLines of code
PHP9612,05158,387109,745
JSON31004,767
Markdown291,32104,186
JavaScript18126451,729
Sass14250959
PO File1232245674
XML6111146
reStructuredText9119243126
CSS721763
DOS Batch2006
INI1111

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 1,148)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 333)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity21.56
▷ Minimum class complexity1.00
▷ Maximum class complexity1,148.00
Average method complexity3.63
▷ Minimum method complexity1.00
▷ Maximum method complexity333.00
Code structure
Namespaces123
Interfaces46
Traits9
Classes876
▷ Abstract classes525.94%
▷ Concrete classes82494.06%
▷ Final classes516.19%
Methods7,255
▷ Static methods2,18430.10%
▷ Public methods5,48575.60%
▷ Protected methods3374.65%
▷ Private methods1,43319.75%
Functions707
▷ Named functions40657.43%
▷ Anonymous functions30142.57%
Constants1,457
▷ Global constants120.82%
▷ Class constants1,44599.18%
▷ Public constants1,28889.13%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.13MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/plugin/banner-772x250.png17.81KB7.38KB▼ 58.54%
assets/plugin/banner-1544x500.png40.15KB15.80KB▼ 60.66%
assets/plugin/icon-256x256.png4.61KB2.42KB▼ 47.43%
assets/plugin/icon-128x128.png2.27KB1.29KB▼ 43.08%
vendor/vielhuber/stringhelper/tests/assets/iptc_not_supported.png70.70KB61.15KB▼ 13.50%