79% easy-translate

Code Review | WPC Simple Translate

WordPress plugin WPC Simple Translate scored79%from 54 tests.

About plugin

  • Plugin page: easy-translate
  • Plugin version: 1.1.9
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.3
  • WordPress version: 6.3.1
  • First release: Dec 30, 2020
  • Latest release: Aug 22, 2023
  • Number of updates: 66
  • Update frequency: every 14.6 days
  • Top authors: webconstructio (51.52%)planetstudio (50%)

Code review

54 tests

User reviews

4 reviews

Install metrics

60+ active /1,876 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.36ms] Passed 4 tests

Server-side resources used by WPC Simple Translate
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0537.07 ▼5.85
Dashboard /wp-admin3.32 ▲0.0146.15 ▼2.44
Posts /wp-admin/edit.php3.37 ▲0.0145.94 ▲0.40
Add New Post /wp-admin/post-new.php5.92 ▲0.0381.46 ▼16.23
Media Library /wp-admin/upload.php3.24 ▲0.0134.83 ▼0.92

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPC Simple Translate
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,926 ▲16913.00 ▼1.251.64 ▼0.3036.37 ▼12.15
Dashboard /wp-admin2,332 ▲1415.80 ▲0.9492.97 ▼13.5940.61 ▼3.30
Posts /wp-admin/edit.php2,175 ▲862.11 ▲0.0836.46 ▼3.3734.63 ▲1.36
Add New Post /wp-admin/post-new.php1,653 ▲11123.07 ▲4.80606.69 ▼36.5035.63 ▼26.81
Media Library /wp-admin/upload.php1,518 ▲1334.15 ▼0.0690.52 ▼5.8742.76 ▼1.63

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-translate/easy-translate.php
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/easy-translate/includes/et-deactivate-popup.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/easy-translate/admin/view.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: internationalization, translation, translators, localisation, multilingual...

easy-translate/easy-translate.php Passed 13 tests

"WPC Simple Translate" version 1.1.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
98 characters long description:
This plugin allows you translate page content, sliders, forms, galleries, page builders widgets...

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
No dangerous file extensions were detected376 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP37169248
CSS1216100
JavaScript111428

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity1.44
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods11
▷ Static methods19.09%
▷ Public methods1090.91%
▷ Protected methods00.00%
▷ Private methods19.09%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin