84% thinker-language-translator

Code Review | Language Translator

WordPress plugin Language Translator scored84%from 54 tests.

About plugin

  • Plugin page: thinker-language-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 11, 2018
  • Latest release: Dec 8, 2021
  • Number of updates: 15
  • Update frequency: every 89.7 days
  • Top authors: thinkerwebdesign (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,462 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.41MB] [CPU: ▼2.38ms] Passed 4 tests

A check of server-side resources used by Language Translator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.66 ▲0.2039.55 ▼1.33
Dashboard /wp-admin3.85 ▲0.5149.75 ▼8.76
Posts /wp-admin/edit.php3.85 ▲0.5049.00 ▲6.21
Add New Post /wp-admin/post-new.php6.33 ▲0.4583.51 ▼5.49
Media Library /wp-admin/upload.php3.85 ▲0.6338.03 ▲6.05
Language Translator /wp-admin/options-general.php?page=thinker_language_translator3.8533.91

Server storage [IO: ▲4.82MB] [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: 760 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
can_compress_scripts
thinker_translator_cache_wp_footer
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
thinker_translator_cache_shortcode
thinker_translator_db_version
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Language Translator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16614.11 ▼0.266.24 ▲4.3841.44 ▼2.37
Dashboard /wp-admin2,238 ▲535.13 ▼0.68118.31 ▲17.5743.87 ▲0.67
Posts /wp-admin/edit.php2,117 ▲312.31 ▲0.2635.82 ▼2.1034.94 ▼1.21
Add New Post /wp-admin/post-new.php1,537 ▲423.28 ▲0.13693.40 ▲12.5836.98 ▼17.73
Media Library /wp-admin/upload.php1,420 ▲354.43 ▲0.2296.43 ▼6.2243.28 ▼3.48
Language Translator /wp-admin/options-general.php?page=thinker_language_translator5,6992.7557.5672.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=thinker_language_translator
    • > Network (severe)
    wp-content/plugins/thinker-language-translator/admin/custom-script.js?ver=1.0.2 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Requires at least: Invalid version format
You can take inspiration from this readme.txt

thinker-language-translator/thinker-language-translator.php Passed 13 tests

The entry point to "Language Translator" version 1.0.2 is a PHP file that has certain tags in its header comment area
62 characters long description:
Add a highly customizable language translator to your website.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin27,152 lines of code in 373 files:
LanguageFilesBlank linesComment linesLines of code
SVG35312822,945
PHP123718572,463
CSS422361,471
JavaScript42988273

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.43
Average class complexity18.43
▷ Minimum class complexity1.00
▷ Maximum class complexity102.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity91.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods38
▷ Static methods25.26%
▷ Public methods3386.84%
▷ Protected methods00.00%
▷ Private methods513.16%
Functions36
▷ Named functions36100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
364 PNG files occupy 0.62MB with 0.29MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/css/l/ig.png0.95KB0.55KB▼ 42.15%
public/css/n/so.png0.87KB0.51KB▼ 41.61%
public/css/n/ec.png6.30KB2.90KB▼ 53.94%
public/css/n/td.png0.33KB0.17KB▼ 48.68%
public/css/n/pr.png1.58KB0.85KB▼ 46.17%