77% translate-websites-translentor

Code Review | Elementor Translator

WordPress plugin Elementor Translator scored77%from 54 tests.

About plugin

  • Plugin page: translate-website...
  • Plugin version: 1.5
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: May 8, 2023
  • Latest release: May 27, 2023
  • Number of updates: 16
  • Update frequency: every 2.2 days
  • Top authors: translentor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /341 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.35ms] Passed 4 tests

An overview of server-side resources used by Elementor Translator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.44 ▼1.70
Dashboard /wp-admin3.33 ▲0.0348.61 ▲1.44
Posts /wp-admin/edit.php3.38 ▲0.0343.89 ▼17.53
Add New Post /wp-admin/post-new.php5.93 ▲0.0583.49 ▼3.60
Media Library /wp-admin/upload.php3.26 ▲0.0336.45 ▲3.87

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 141 new files
Database: no new tables, 10 new options
New WordPress options
db_upgraded
can_compress_scripts
iconstroke
widget_recent-comments
translentor
woomentorcurrency
theysaidso_admin_options
texthightlight
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Elementor Translator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲6513.26 ▼1.071.88 ▼0.1745.38 ▲1.11
Dashboard /wp-admin2,239 ▲474.89 ▼0.08106.46 ▲2.1545.45 ▲0.62
Posts /wp-admin/edit.php2,125 ▲332.08 ▲0.1135.80 ▼5.1635.47 ▼4.25
Add New Post /wp-admin/post-new.php1,541 ▲1323.27 ▲5.14677.30 ▲10.5655.85 ▼2.43
Media Library /wp-admin/upload.php1,424 ▲454.24 ▲0.1097.39 ▼1.0146.10 ▲3.61

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 10 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • texthightlight
    • db_upgraded
    • woomentorcurrency
    • theysaidso_admin_options
    • iconstroke
    • widget_recent-posts
    • can_compress_scripts
    • translentor

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 8× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/translate-websites-translentor/woomentorcurrency/classes/storage.php
    • > /wp-content/plugins/translate-websites-translentor/woomentorcurrency/classes/fixed/fixed_amount.php
    • > /wp-content/plugins/translate-websites-translentor/woomentorcurrency/classes/fixed/fixed_user_role.php
    • > /wp-content/plugins/translate-websites-translentor/woomentorcurrency/classes/fixed/fixed_coupon.php
    • > /wp-content/plugins/translate-websites-translentor/woomentorcurrency/classes/profiles.php
    • > /wp-content/plugins/translate-websites-translentor/woomentorcurrency/classes/fixed/fixed_shipping.php
    • > /wp-content/plugins/translate-websites-translentor/woomentorcurrency/classes/fixed/fixed_price.php
    • > /wp-content/plugins/translate-websites-translentor/woomentorcurrency/classes/fixed/fixed_shipping_free.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/translate-websites-translentor/widgets/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/translate-websites-translentor/translentor.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/translate-websites-translentor/admin/module/translentor-module.php:12

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: elementor translator, ai translation, google translate, automatic translation, deepl translation...

translate-websites-translentor/translentor.php 77% from 13 tests

This is the main PHP file of "Elementor Translator" version 1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("translate-websites-translentor.php" instead of "translentor.php")
  • Domain Path: The domain path must begin with a forward slash character ("/translentor")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("translentor")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected20,066 lines of code in 121 files:
LanguageFilesBlank linesComment linesLines of code
PHP282,13984115,000
SVG650383,325
JavaScript1521236904
CSS138619837

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity48.88
▷ Minimum class complexity1.00
▷ Maximum class complexity834.00
Average method complexity4.04
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes25
▷ Abstract classes00.00%
▷ Concrete classes25100.00%
▷ Final classes520.00%
Methods370
▷ Static methods133.51%
▷ Public methods27674.59%
▷ Protected methods8522.97%
▷ Private methods92.43%
Functions23
▷ Named functions626.09%
▷ Anonymous functions1773.91%
Constants14
▷ Global constants14100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
10 PNG files occupy 0.80MB with 0.38MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
translentor/assets/logo/menu-icon.png0.35KB0.24KB▼ 32.40%
assets/icon-256x256.png5.16KB2.89KB▼ 43.94%
assets/screenshot-2.png.png50.31KB20.98KB▼ 58.29%
assets/icon-128x128.png2.90KB1.85KB▼ 36.18%
assets/screenshot-6.png.png92.27KB31.80KB▼ 65.53%