10% easy-translator-lite

Code Review | Easy Translator

WordPress plugin Easy Translator scored 10% from 54 tests.

About plugin

  • Plugin page: easy-translator-lite
  • Plugin version: 4.90
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.8
  • WordPress version: 6.3.1
  • First release: Mar 7, 2012
  • Latest release: Aug 1, 2017
  • Number of updates: 74
  • Update frequency: every 26.7 days
  • Top authors: manojtd (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active / 50,516 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/easy-translator-lite/easy-translator-lite.php+433
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyTranslatorWidget has a deprecated constructor

Server metrics [RAM: ▼1.81MB] [CPU: ▼51.56ms] Passed 4 tests

Server-side resources used by Easy Translator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.18 ▼1.284.73 ▼37.53
Dashboard /wp-admin2.20 ▼1.106.46 ▼44.40
Posts /wp-admin/edit.php2.20 ▼1.166.92 ▼38.10
Add New Post /wp-admin/post-new.php2.20 ▼3.696.67 ▼86.21
Media Library /wp-admin/upload.php2.20 ▼1.035.56 ▼28.02
Easy Translator /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php2.206.45

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts
widget_easytranslatorwidget
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Easy Translator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲7613.36 ▼1.322.05 ▲0.1742.65 ▲2.63
Dashboard /wp-admin2,214 ▲265.78 ▲0.8896.25 ▼22.9739.66 ▼2.75
Posts /wp-admin/edit.php2,097 ▲82.04 ▲0.0539.36 ▲3.3935.07 ▲1.46
Add New Post /wp-admin/post-new.php1,538 ▲1923.34 ▲0.35600.65 ▼66.3849.43 ▼8.78
Media Library /wp-admin/upload.php1,396 ▲54.18 ▼0.0294.08 ▼5.8541.38 ▼3.25
Easy Translator /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php1,1562.4333.9658.89
Easy Translator Lite /wp-admin/easy-translator-lite.php260.440.0614.50

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/easy-translator-lite/easy-translator-lite.php+433
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyTranslatorWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_easytranslatorwidget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/easy-translator-lite.php+433
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyTranslatorWidget has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+21
    Methods with the same name as their class will not be constructors in a future version of PHP; EzBaseOption has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+176
    Methods with the same name as their class will not be constructors in a future version of PHP; EzCheckBox has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+201
    Methods with the same name as their class will not be constructors in a future version of PHP; EzRadioBox has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+252
    Methods with the same name as their class will not be constructors in a future version of PHP; EzSelect has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+296
    Methods with the same name as their class will not be constructors in a future version of PHP; EzMessage has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+315
    Methods with the same name as their class will not be constructors in a future version of PHP; EzHelpTag has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+330
    Methods with the same name as their class will not be constructors in a future version of PHP; EzHelpPopUp has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+348
    Methods with the same name as their class will not be constructors in a future version of PHP; EzTextArea has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+368
    Methods with the same name as their class will not be constructors in a future version of PHP; EzText has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+387
    Methods with the same name as their class will not be constructors in a future version of PHP; EzSubmit has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+413
    Methods with the same name as their class will not be constructors in a future version of PHP; EzColorPicker has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+436
    Methods with the same name as their class will not be constructors in a future version of PHP; EzOneTab has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/EzOptions.php+480
    Methods with the same name as their class will not be constructors in a future version of PHP; EzMiniTab has a deprecated constructor
    • > GET request to /wp-admin/tools.php?page=easy-translator-lite/easy-translator-lite.php
    • > Deprecated in wp-content/plugins/easy-translator-lite/easy-translator-lite.php+523
    Function create_function() is deprecated

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
Almost there! Just fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/easy-translator-lite/myPlugins.php:300
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-translator-lite/ezDenyLite.php on line 22
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/easy-translator-lite/ezDenyLite.php on line 22
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/easy-translator-lite/ezDenyLite.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/easy-translator-lite/EzOptions.php:544

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
    • > GET request to /wp-admin/easy-translator-lite.php
    • > Network (severe)
    wp-admin/easy-translator-lite.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Blog page translation - Google widget), #2 (Blog page translation - Microsoft widget), #3 (Widget customization), #4 (How to use the plugin translator - The Editor), #5 (The POT File Viewer in the plugin translator.)
The official readme.txt is a good inspiration

easy-translator-lite/easy-translator-lite.php 85% from 13 tests

The principal PHP file in "Easy Translator" v. 4.90 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 202 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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 plugin3,216 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP63511,1232,100
JavaScript1511341,116

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity17.75
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity3.29
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods147
▷ Static methods74.76%
▷ Public methods13994.56%
▷ Protected methods00.00%
▷ Private methods85.44%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants2
▷ Global constants00.00%
▷ Class constants2100.00%
▷ Public constants2100.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
9 PNG files occupy 0.41MB with 0.25MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ezsupport.png3.13KB2.01KB▼ 35.75%
screenshot-5.png159.44KB41.84KB▼ 73.76%
img/ezpaypal.png9.22KB3.44KB▼ 62.72%
ezpaypal.png9.22KB3.44KB▼ 62.72%
screenshot-2.png33.67KB10.37KB▼ 69.19%