68% linguise

Code Review | Linguise - Automatic multilingual translation

WordPress plugin Linguise - Automatic multilingual translation scored68%from 54 tests.

About plugin

  • Plugin page: linguise
  • Plugin version: 1.10.8
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.4
  • WordPress version: 6.3.1
  • First release: Apr 24, 2021
  • Latest release: Nov 20, 2023
  • Number of updates: 138
  • Update frequency: every 6.8 days
  • Top authors: linguise (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

800+ active /18,457 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.34MB] [CPU: ▼2.89ms] Passed 4 tests

This is a short check of server-side resources used by Linguise - Automatic multilingual translation
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.81 ▲0.3545.93 ▲8.51
Dashboard /wp-admin3.64 ▲0.3446.57 ▲1.31
Posts /wp-admin/edit.php3.76 ▲0.4046.39 ▼1.55
Add New Post /wp-admin/post-new.php6.22 ▲0.3481.57 ▼11.04
Media Library /wp-admin/upload.php3.56 ▲0.3338.52 ▼0.29

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 298 new files
Database: 1 new table, 8 new options
New tables
wp_linguise_urls
New WordPress options
db_upgraded
linguise_install_time
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
linguise_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for Linguise - Automatic multilingual translation
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6114.05 ▼0.271.74 ▲0.0243.20 ▲2.24
Dashboard /wp-admin2,225 ▲485.51 ▼0.1583.19 ▼11.0575.88 ▲32.20
Posts /wp-admin/edit.php2,133 ▲332.11 ▲0.1035.40 ▼4.5933.06 ▼3.90
Add New Post /wp-admin/post-new.php1,557 ▲2121.03 ▼2.34750.84 ▼5.9156.43 ▲4.04
Media Library /wp-admin/upload.php1,430 ▲304.21 ▼0.0997.30 ▼4.0968.43 ▲21.61

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_linguise_urls
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • linguise_version
    • db_upgraded
    • theysaidso_admin_options
    • linguise_install_time
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/linguise/src/frontend/ukrainian_redirection.php
    • > /wp-content/plugins/linguise/src/admin/menu.php
    • > /wp-content/plugins/linguise/src/frontend/browser_language.php
  • 14× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/linguise/src/install.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function linguiseGetOptions() in wp-content/plugins/linguise/src/elementor.php:10
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/linguise/src/woocommerce.php on line 15
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Imposter\\ImposterInterface' not found in wp-content/plugins/linguise/vendor/typisttech/imposter/src/Imposter.php:7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/linguise/src/woocommerce.php on line 15
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Imposter\\FilesystemInterface' not found in wp-content/plugins/linguise/vendor/typisttech/imposter/src/Filesystem.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Imposter\\ConfigInterface' not found in wp-content/plugins/linguise/vendor/typisttech/imposter/src/ProjectConfigInterface.php:7
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/linguise/src/woocommerce.php on line 15
    • > PHP Fatal error
      Uncaught Error: Interface 'TypistTech\\Imposter\\TransformerInterface' not found in wp-content/plugins/linguise/vendor/typisttech/imposter/src/Transformer.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/linguise/src/woocommerce.php:16

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: translation, woocommerce translation, front-end translation, multilingual, automatic translation...

linguise/linguise.php 92% from 13 tests

"Linguise - Automatic multilingual translation" version 1.10.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin21,169 lines of code in 273 files:
LanguageFilesBlank linesComment linesLines of code
PHP801,5421,83910,171
SVG168181476,284
Sass323501,845
JSON8101,225
JavaScript511723987
Markdown52080417
XML14280126
HTML100111
CSS2283

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity16.11
▷ Minimum class complexity1.00
▷ Maximum class complexity153.00
Average method complexity3.53
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces12
Interfaces6
Traits0
Classes49
▷ Abstract classes00.00%
▷ Concrete classes49100.00%
▷ Final classes36.12%
Methods346
▷ Static methods12636.42%
▷ Public methods29785.84%
▷ Protected methods195.49%
▷ Private methods308.67%
Functions105
▷ Named functions6057.14%
▷ Anonymous functions4542.86%
Constants63
▷ Global constants5993.65%
▷ Class constants46.35%
▷ Public constants375.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 compressed PNG files occupy 0.00MB
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/close.png0.20KB0.21KB0.00%
assets/images/chosen-sprite@2x.png0.72KB0.83KB0.00%
assets/images/chosen-sprite.png0.53KB0.88KB0.00%