10% falang

Code Review | Falang multilanguage for WordPress

WordPress plugin Falang multilanguage for WordPress scored10%from 54 tests.

About plugin

  • Plugin page: falang
  • Plugin version: 1.3.43
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.3
  • WordPress version: 6.3.1
  • First release: Sep 24, 2019
  • Latest release: Oct 11, 2023
  • Number of updates: 87
  • Update frequency: every 17.0 days
  • Top authors: sbouey (100%)

Code review

54 tests

User reviews

74 reviews

Install metrics

1,000+ active /38,498 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/falang/includes/class-falang-activator.php+160
    Undefined index: rtl

Server metrics [RAM: ▲1.70MB] [CPU: ▲11.71ms] Passed 4 tests

Server-side resources used by Falang multilanguage for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /5.03 ▲1.5759.71 ▲18.84
Dashboard /wp-admin5.06 ▲1.7566.13 ▲14.47
Posts /wp-admin/edit.php5.10 ▲1.7460.07 ▲5.20
Add New Post /wp-admin/post-new.php7.74 ▲1.8598.44 ▲9.39
Media Library /wp-admin/upload.php4.97 ▲1.7452.10 ▲17.76
Get Help /wp-admin/admin.php?page=falang-help4.9646.93
Translate Posts /wp-admin/admin.php?page=falang-translation5.0447.99
Translate Strings /wp-admin/admin.php?page=falang-strings5.0146.43
Translate Terms/Taxo /wp-admin/admin.php?page=falang-terms5.0059.09
Translate Options /wp-admin/admin.php?page=falang-options5.0248.61
Settings /wp-admin/admin.php?page=falang-settings5.0144.54
Languages /wp-admin/admin.php?page=falang-language4.9946.29
Translate Menus /wp-admin/admin.php?page=falang-menus5.0045.58

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 437 new files
Database: no new tables, 12 new options
New WordPress options
widget_falang
falang
widget_recent-comments
theysaidso_admin_options
falang_dismissed_notices
db_upgraded
widget_theysaidso_widget
falang_wpml_strings
widget_recent-posts
can_compress_scripts
...

Browser metrics Passed 4 tests

An overview of browser requirements for Falang multilanguage for WordPress
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,890 ▲12914.38 ▼0.211.77 ▼0.0640.87 ▼3.49
Dashboard /wp-admin2,275 ▲985.71 ▲0.1285.62 ▼14.7887.07 ▲41.41
Posts /wp-admin/edit.php2,187 ▲842.22 ▲0.2033.99 ▼2.1332.60 ▼2.25
Add New Post /wp-admin/post-new.php6,320 ▲4,79426.04 ▲2.391,004.39 ▲302.7759.13 ▲3.47
Media Library /wp-admin/upload.php1,455 ▲584.39 ▲0.23101.75 ▲0.1567.35 ▲23.11
Get Help /wp-admin/admin.php?page=falang-help9911.9325.3540.42
Translate Posts /wp-admin/admin.php?page=falang-translation1,1101.9625.8130.35
Translate Strings /wp-admin/admin.php?page=falang-strings1,1811.9426.0531.13
Translate Terms/Taxo /wp-admin/admin.php?page=falang-terms1,0531.9426.6629.00
Translate Options /wp-admin/admin.php?page=falang-options1,1761.9626.1334.79
Settings /wp-admin/admin.php?page=falang-settings1,4621.9827.8534.03
Languages /wp-admin/admin.php?page=falang-language1,0202.3432.5834.72
Translate Menus /wp-admin/admin.php?page=falang-menus1,0061.8427.1830.81

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
  • Zombie WordPress options were found after uninstall: 12 options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • falang
    • theysaidso_admin_options
    • widget_falang
    • WPLANG
    • falang_wpml_strings
    • widget_theysaidso_widget
    • falang_dismissed_notices
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/falang/admin/views/help_page.php
    • > /wp-content/plugins/falang/public/partials/falang-public-display.php
    • > /wp-content/plugins/falang/admin/views/settings_tab_informations.php
  • 46× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Falang() in wp-content/plugins/falang/admin/views/language_edit_page.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Falang\\Core\\Links' not found in wp-content/plugins/falang/src/Falang/Core/Admin_Links.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Falang\\Core\\Falang_Rewrite' not found in wp-content/plugins/falang/admin/class-falang-admin.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'Falang\\Filter\\Filters' not found in wp-content/plugins/falang/src/Falang/Filter/Admin/Filters_Columns.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Falang\\Model\\Falang_Model' not found in wp-content/plugins/falang/admin/views/settings_taxonomy_option_page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/falang/admin/views/settings_tab_licence.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Falang\\Filter\\Filters' not found in wp-content/plugins/falang/src/Falang/Filter/Admin/Attachment.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'Falang\\Filter\\Filters' not found in wp-content/plugins/falang/src/Falang/Filter/Admin/User_Profile.php:13
    • > PHP Fatal error
      require(): Failed opening required 'ABSPATHwp-admin/options-head.php' (include_path='.:/usr/share/php') in wp-content/plugins/falang/admin/views/falang-admin-display.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/falang/admin/views/settings_tab_general_settings.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Donate link: Please fix this invalid url: "www.faboba.com/falangw/"
  • Screenshots: A description for screenshot #4 is missing in falang/assets to your readme.txt
You can look at the official readme.txt

falang/falang.php Passed 13 tests

Analyzing the main PHP file in "Falang multilanguage for WordPress" version 1.3.43
41 characters long description:
Adds multilingual capability to WordPress

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 detected28,119 lines of code in 133 files:
LanguageFilesBlank linesComment linesLines of code
PHP1044,0016,12312,541
SVG41129,312
PO File52,1982,5684,600
CSS510158871
JavaScript126781595
XML23628184
JSON10016

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity26.37
▷ Minimum class complexity1.00
▷ Maximum class complexity340.00
Average method complexity3.81
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes65
▷ Abstract classes00.00%
▷ Concrete classes65100.00%
▷ Final classes00.00%
Methods587
▷ Static methods264.43%
▷ Public methods53090.29%
▷ Protected methods244.09%
▷ Private methods335.62%
Functions17
▷ Named functions1694.12%
▷ Anonymous functions15.88%
Constants17
▷ Global constants952.94%
▷ Class constants847.06%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
275 compressed PNG files occupy 0.17MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
flags/jp.png0.41KB0.46KB0.00%
flags/cc.png0.61KB0.70KB0.00%
flags/ca.png0.61KB0.68KB0.00%
flags/my.png0.56KB0.72KB0.00%
flags/eh.png0.50KB0.67KB0.00%