78% translate-by-supsystic

Code Review | Translate by Supsystic

WordPress plugin Translate by Supsystic scored 78% from 54 tests.

About plugin

  • Plugin page: translate-by-sups...
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress version: 5.8.1
  • First release: Apr 9, 2017
  • Latest release: Sep 15, 2020
  • Number of updates: 38
  • Update frequency: every 33.0 days
  • Top authors: supsystic.com (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 11,491 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲1.83MB] [CPU: ▼174.91ms] Passed 4 tests

An overview of server-side resources used by Translate by Supsystic
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.75 ▲1.9142.02 ▲16.64
Dashboard /wp-admin5.03 ▲1.9656.47 ▲13.90
Posts /wp-admin/edit.php5.08 ▲1.9746.05 ▲9.79
Add New Post /wp-admin/post-new.php6.93 ▲1.4976.06 ▼733.46
Media Library /wp-admin/upload.php4.97 ▲1.9736.10 ▲10.12
Settings /wp-admin/admin.php?page=translate-by-supsystic&tab=settings5.0541.17
Featured Plugins /wp-admin/admin.php?page=translate-by-supsystic&tab=featured-plugins5.1646.43
Translate by Supsystic /wp-admin/admin.php?page=translate-by-supsystic5.0437.18
Overview /wp-admin/admin.php?page=translate-by-supsystic&tab=overview5.1635.75

Server storage [DB: ▲0.05MB] Passed 3 tests

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: no files
Database: 3 new tables, 5 new options
New tables
wp_tbs_modules
wp_tbs_modules_type
wp_tbs_usage_stat
New WordPress options
wp_tbs_db_version
tbs_opts_data
tbs_plugin_activation_errors
widget_formswidgetwptbs
wp_tbs_db_installed

Browser metrics Passed 4 tests

Checking browser requirements for Translate by Supsystic
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,711 ▲11015.67 ▼0.404.93 ▼3.7076.07 ▲1.71
Dashboard /wp-admin2,979 ▲836.16 ▼0.15113.54 ▼17.93167.71 ▼4.96
Posts /wp-admin/edit.php2,786 ▲463.24 ▲0.0269.83 ▲5.74146.83 ▲5.52
Add New Post /wp-admin/post-new.php1,967 ▼1,73921.11 ▲2.36412.27 ▼23.82164.87 ▼2.32
Media Library /wp-admin/upload.php1,795 ▲435.52 ▼0.01148.83 ▲8.42187.17 ▲1.94
Settings /wp-admin/admin.php?page=translate-by-supsystic&tab=settings3,5046.24114.58301.03
Featured Plugins /wp-admin/admin.php?page=translate-by-supsystic&tab=featured-plugins2,5205.33107.86304.28
Translate by Supsystic /wp-admin/admin.php?page=translate-by-supsystic3,5146.11113.97203.96
Overview /wp-admin/admin.php?page=translate-by-supsystic&tab=overview2,0995.2792.54208.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 3 options
    • tbs_plugin_activation_errors
    • tbs_opts_data
    • widget_formswidgetwptbs

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=translate-by-supsystic&tab=overview
    • > User notice in wp-includes/functions.php+5663
    WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

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
The following issues need your attention
  • 58× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'moduleTbs' not found in wp-content/plugins/translate-by-supsystic/modules/admin_nav/mod.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'controllerTbs' not found in wp-content/plugins/translate-by-supsystic/modules/supsystic_promo/controller.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'baseObjectTbs' not found in wp-content/plugins/translate-by-supsystic/classes/module.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'moduleTbs' not found in wp-content/plugins/translate-by-supsystic/modules/user/mod.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'controllerTbs' not found in wp-content/plugins/translate-by-supsystic/modules/admin_nav/controller.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'viewTbs' not found in wp-content/plugins/translate-by-supsystic/modules/options/views/options.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'moduleTbs' not found in wp-content/plugins/translate-by-supsystic/modules/templates/mod.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'moduleTbs' not found in wp-content/plugins/translate-by-supsystic/modules/gmap/mod.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/translate-by-supsystic/modules/supsystic_promo/views/tpl/adminFooter.php:4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/translate-by-supsystic/config.php on line 21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: bilingual, language, multilingual, localization, multilanguage...

translate-by-supsystic/tbs.php 92% from 13 tests

The main PHP script in "Translate by Supsystic" version 1.2.5 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("translate-by-supsystic.php" instead of "tbs.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin13,770 lines of code in 113 files:
LanguageFilesBlank linesComment linesLines of code
PHP784071,7499,592
JavaScript151333292,229
CSS19951801,948
JSON1001

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity28.73
▷ Minimum class complexity1.00
▷ Maximum class complexity227.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes64
▷ Abstract classes710.94%
▷ Concrete classes5789.06%
▷ Final classes00.00%
Methods788
▷ Static methods24631.22%
▷ Public methods71991.24%
▷ Protected methods526.60%
▷ Private methods172.16%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants79
▷ Global constants6481.01%
▷ Class constants1518.99%
▷ Public constants15100.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
468 compressed PNG files occupy 0.51MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/lang/flags/24/gd.png1.13KB1.01KB▼ 10.95%
modules/lang/flags/16/tr.png0.56KB0.54KB▼ 3.83%
modules/lang/flags/16/hmn.png0.46KB0.46KB0.00%
modules/lang/flags/32/yo.png0.63KB0.64KB0.00%
modules/lang/flags/32/ka.png0.85KB0.83KB▼ 1.50%