89% mylang-easy-site-translator-for-wpml

Code Review | myLang Easy Site Translator for WPML

WordPress plugin myLang Easy Site Translator for WPML scored 89% from 54 tests.

About plugin

  • Plugin page: mylang-easy-site-...
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-5.9
  • WordPress version: 6.3.1
  • First release: Dec 1, 2021
  • Latest release: Mar 31, 2022
  • Number of updates: 23
  • Update frequency: every 5.3 days
  • Top authors: mylangme (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 1,098 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.05MB] [CPU: ▲0.04ms] Passed 4 tests

An overview of server-side resources used by myLang Easy Site Translator for WPML
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0636.18 ▲2.17
Dashboard /wp-admin3.37 ▲0.0645.36 ▲2.35
Posts /wp-admin/edit.php3.42 ▲0.0649.54 ▲4.01
Add New Post /wp-admin/post-new.php5.50 ▼0.3877.47 ▼8.37
Media Library /wp-admin/upload.php3.29 ▲0.0635.56 ▲4.15

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: 2 new tables, 7 new options
New tables
wp_mylang_glossary
wp_mylang_translate_queue
New WordPress options
can_compress_scripts
widget_theysaidso_widget
mylang_db_version
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for myLang Easy Site Translator for WPML
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲4013.31 ▼1.481.67 ▼0.1542.95 ▲0.08
Dashboard /wp-admin2,238 ▲295.92 ▲0.07106.62 ▼13.2070.38 ▲23.29
Posts /wp-admin/edit.php2,124 ▲382.22 ▲0.2345.52 ▲7.8537.75 ▲4.30
Add New Post /wp-admin/post-new.php6,533 ▲5,01320.19 ▼3.061,024.07 ▲294.5348.21 ▼8.60
Media Library /wp-admin/upload.php1,417 ▲354.16 ▼0.15102.20 ▼3.2375.81 ▲29.64

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • mylang_db_version
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Looking good! No server-side errors or output on direct access of PHP files

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
No tags were found

mylang-easy-site-translator-for-wpml/mylang.php 85% from 13 tests

"myLang Easy Site Translator for WPML" version 1.3.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("mylang-easy-site-translator-for-wpml.php" instead of "mylang.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected3,437 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP64314462,489
CSS210324488
JavaScript211044460

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.44
Average class complexity356.00
▷ Minimum class complexity356.00
▷ Maximum class complexity356.00
Average method complexity6.22
▷ Minimum method complexity1.00
▷ Maximum method complexity100.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods68
▷ Static methods00.00%
▷ Public methods6392.65%
▷ Protected methods00.00%
▷ Private methods57.35%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
mylang_logo.png4.13KB2.94KB▼ 28.84%