83% lingotek-translation

Code Review | Ray Enterprise Translation

WordPress plugin Ray Enterprise Translation scored83%from 54 tests.

About plugin

  • Plugin page: lingotek-translation
  • Plugin version: 1.6.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.0
  • WordPress version: 6.3.1
  • First release: Jul 6, 2015
  • Latest release: Mar 18, 2023
  • Number of updates: 99
  • Update frequency: every 28.4 days
  • Top authors: erichie (30.3%)smithworx (26.26%)elliothanna (12.12%)sowmiya2021 (11.11%)npaudyal (6.06%)

Code review

54 tests

User reviews

46 reviews

Install metrics

20,000+ active /1,233,251 total downloads


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
Install script ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼0.95ms] Passed 4 tests

A check of server-side resources used by Ray Enterprise Translation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1845.98 ▼1.48
Dashboard /wp-admin3.46 ▲0.1556.58 ▲8.84
Posts /wp-admin/edit.php3.57 ▲0.2148.73 ▼0.81
Add New Post /wp-admin/post-new.php6.04 ▲0.1585.22 ▼5.40
Media Library /wp-admin/upload.php3.38 ▲0.1538.74 ▲3.91

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 152 new files
Database: no new tables, 8 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Ray Enterprise Translation
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,826 ▲8014.52 ▲0.131.73 ▲0.0743.60 ▼0.16
Dashboard /wp-admin2,229 ▲495.62 ▼0.0083.00 ▼15.0341.51 ▲0.47
Posts /wp-admin/edit.php2,134 ▲342.25 ▲0.2336.21 ▲2.5633.14 ▼2.57
Add New Post /wp-admin/post-new.php1,548 ▲2023.21 ▲0.06638.48 ▼40.7558.75 ▲2.58
Media Library /wp-admin/upload.php1,437 ▲404.35 ▲0.1696.58 ▼2.7145.08 ▲1.74

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • lingotek_plugin_version
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% 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
  • 57× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Lingotek_API' not found in wp-content/plugins/lingotek-translation/admin/settings/view-account.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url_raw() in wp-content/plugins/lingotek-translation/admin/settings/connect-account.php:33
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/lingotek-translation/admin/import/import-table.php on line 11
    • > PHP Fatal error
      Uncaught Error: Class 'Lingotek_Group' not found in wp-content/plugins/lingotek-translation/include/group-string.php:8
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/lingotek-translation/admin/strings-table.php on line 5
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/lingotek-translation/admin/import/import-table.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lingotek-translation/admin/tutorial/faq.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/lingotek-translation/admin/tutorial/credits.php:96
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/lingotek-translation/admin/settings/view-preferences.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'Lingotek_Group' not found in wp-content/plugins/lingotek-translation/include/group-term.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

lingotek-translation/lingotek.php 92% from 13 tests

The main PHP file in "Ray Enterprise Translation" ver. 1.6.2 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lingotek-translation.php" instead of "lingotek.php")

Code Analysis Passed 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 plugin15,382 lines of code in 106 files:
LanguageFilesBlank linesComment linesLines of code
PO File1257273673

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.50
Average class complexity41.17
▷ Minimum class complexity1.00
▷ Maximum class complexity207.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity74.00
Code structure
▷ Abstract classes37.14%
▷ Concrete classes3992.86%
▷ Final classes00.00%
▷ Static methods8116.46%
▷ Public methods41584.35%
▷ Protected methods448.94%
▷ Private methods336.71%
▷ Named functions375.00%
▷ Anonymous functions125.00%
▷ Global constants1372.22%
▷ Class constants527.78%
▷ Public constants5100.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
39 PNG files occupy 1.38MB with 0.83MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/tutorial/img/add-page2.png3.89KB1.99KB▼ 48.86%
admin/tutorial/img/selection-workflow-from-list.png50.32KB20.82KB▼ 58.63%
admin/tutorial/img/translations-ready-for-download.png6.08KB2.51KB▼ 58.63%
admin/tutorial/img/check-status.png6.61KB2.61KB▼ 60.52%
admin/tutorial/img/workbench.png73.94KB19.93KB▼ 73.04%