73% etranslation-multilingual

Code Review | eTranslation Multilingual

WordPress plugin eTranslation Multilingual scored73%from 54 tests.

About plugin

  • Plugin page: etranslation-mult...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 7, 2023
  • Latest release: Mar 7, 2023
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: tildesia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /172 total downloads

Benchmarks

Plugin footprint 65% 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: ▲4.04MB] [CPU: ▲20.15ms] Passed 4 tests

An overview of server-side resources used by eTranslation Multilingual
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /7.45 ▲3.9853.40 ▲13.50
Dashboard /wp-admin7.38 ▲4.0473.69 ▲14.05
Posts /wp-admin/edit.php7.43 ▲4.0772.75 ▲24.31
Add New Post /wp-admin/post-new.php9.97 ▲4.09125.26 ▲31.60
Media Library /wp-admin/upload.php7.30 ▲4.0766.33 ▲28.74
ETMHidden /wp-admin/admin.php?page=etm_update_database7.2761.13
eTranslation Multilingual /wp-admin/options-general.php?page=etranslation-multilingual7.0848.97
ETMHidden /wp-admin/admin.php?page=etm_advanced_page7.3373.29
ETMHidden /wp-admin/admin.php?page=etm_test_machine_api7.30437.54
ETMHidden /wp-admin/admin.php?page=etm_machine_translation7.3361.37
ETMHidden /wp-admin/admin.php?page=etm_error_manager7.2853.80
ETMHidden /wp-admin/admin.php?page=etm_remove_duplicate_rows7.2860.79

Server storage [IO: ▲4.70MB] [DB: ▲0.06MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • Illegal file modification found: 1 file (0.12KB) outside of "wp-content/plugins/etranslation-multilingual/" and "wp-content/uploads/"
    • (new file) wp-content/debug.log
Filesystem: 308 new files
Database: 4 new tables, 10 new options
New tables
wp_etm_etranslation_jobs
wp_etm_gettext_original_meta
wp_etm_gettext_original_strings
wp_etm_gettext_en_gb
New WordPress options
widget_recent-comments
etm_show_error_db_message
theysaidso_admin_options
etm_plugin_version
widget_theysaidso_widget
db_upgraded
etm_settings
etm_db_stored_data
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for eTranslation Multilingual
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,854 ▲10813.30 ▼1.071.68 ▼0.2737.73 ▼9.02
Dashboard /wp-admin2,230 ▲396.02 ▲1.1495.94 ▼8.4536.66 ▼6.39
Posts /wp-admin/edit.php2,110 ▲212.01 ▼0.0036.37 ▼4.0936.59 ▼0.77
Add New Post /wp-admin/post-new.php1,576 ▲4822.88 ▲4.82664.90 ▲53.2363.11 ▲9.76
Media Library /wp-admin/upload.php1,412 ▲274.20 ▼0.0995.63 ▼3.7941.45 ▼3.14
ETMHidden /wp-admin/admin.php?page=etm_update_database8111.7432.6628.26
eTranslation Multilingual /wp-admin/options-general.php?page=etranslation-multilingual1,1552.1839.1822.27
ETMHidden /wp-admin/admin.php?page=etm_advanced_page1,7832.1637.5633.62
ETMHidden /wp-admin/admin.php?page=etm_test_machine_api8592.0421.9235.53
ETMHidden /wp-admin/admin.php?page=etm_machine_translation1,1492.1026.6223.94
ETMHidden /wp-admin/admin.php?page=etm_error_manager8262.1722.0927.65
ETMHidden /wp-admin/admin.php?page=etm_remove_duplicate_rows9022.0322.2128.48

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 4 tables
    • wp_etm_gettext_original_strings
    • wp_etm_gettext_en_gb
    • wp_etm_etranslation_jobs
    • wp_etm_gettext_original_meta
  • The uninstall procedure has failed, leaving 10 options in the database
    • widget_recent-comments
    • etm_plugin_version
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • etm_show_error_db_message
    • widget_recent-posts
    • etm_db_stored_data
    • db_upgraded
    • etm_settings

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Please fix the following
  • 48× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/etranslation-multilingual/includes/advanced-settings/custom-date-format.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/etranslation-multilingual/includes/advanced-settings/regular-tab-string-translation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/etranslation-multilingual/includes/advanced-settings/strip-gettext-post-content.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/etranslation-multilingual/includes/class-search.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/etranslation-multilingual/partials/etm-update-database.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/etranslation-multilingual/includes/advanced-settings/enable-numerals-translation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/etranslation-multilingual/includes/advanced-settings/disable-gettext-strings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/etranslation-multilingual/includes/advanced-settings/separators.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/etranslation-multilingual/includes/advanced-settings/fix-broken-html.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/etranslation-multilingual/partials/main-settings-language-selector.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: bilingual, eu, automatic translation, multilingual, europe...

etranslation-multilingual/index.php 85% from 13 tests

The main file in "eTranslation Multilingual" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("etranslation-multilingual.php" instead of "index.php")
  • Requires at least: The required version number did not match the one declared in readme.txt ("3.1.0" instead of "2.5.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin29,574 lines of code in 166 files:
LanguageFilesBlank linesComment linesLines of code
PHP923,4984,94617,775
JavaScript622,58778610,192
CSS8220311,191
SVG201298
Markdown2240118

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 152)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity54.83
▷ Minimum class complexity4.00
▷ Maximum class complexity376.00
Average method complexity4.78
▷ Minimum method complexity1.00
▷ Maximum method complexity152.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes48
▷ Abstract classes00.00%
▷ Concrete classes48100.00%
▷ Final classes00.00%
Methods682
▷ Static methods192.79%
▷ Public methods60789.00%
▷ Protected methods355.13%
▷ Private methods405.87%
Functions270
▷ Named functions26397.41%
▷ Anonymous functions72.59%
Constants53
▷ Global constants4584.91%
▷ Class constants815.09%
▷ Public constants8100.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
131 compressed PNG files occupy 0.24MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/edit-icon.png1.57KB1.34KB▼ 14.26%
assets/images/flags/sq.png0.47KB0.42KB▼ 9.43%
assets/images/flags/lt_LT.png0.25KB0.18KB▼ 25.50%
assets/images/flags/hr.png0.40KB0.34KB▼ 13.30%
assets/images/flags/tt_RU.png0.44KB0.40KB▼ 9.69%