84% multisite-language-switcher

Code Review | Multisite Language Switcher

WordPress plugin Multisite Language Switcher scored84%from 54 tests.

About plugin

  • Plugin page: multisite-languag...
  • Plugin version: 2.6.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Jun 3, 2011
  • Latest release: Nov 27, 2023
  • Number of updates: 348
  • Update frequency: every 13.1 days
  • Top authors: realloc (100%)

Code review

54 tests

User reviews

93 reviews

Install metrics

5,000+ active /539,155 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▼6.03ms] Passed 4 tests

This is a short check of server-side resources used by Multisite Language Switcher
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2237.46 ▼4.46
Dashboard /wp-admin3.54 ▲0.2048.35 ▼15.15
Posts /wp-admin/edit.php3.60 ▲0.2449.80 ▼0.19
Add New Post /wp-admin/post-new.php6.06 ▲0.1894.46 ▼4.32
Media Library /wp-admin/upload.php3.40 ▲0.1735.58 ▲1.32

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 1,036 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Multisite Language Switcher
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,796 ▲2414.67 ▲0.401.60 ▼0.3137.59 ▼6.43
Dashboard /wp-admin2,201 ▲245.62 ▼0.0393.68 ▼11.4046.50 ▼0.37
Posts /wp-admin/edit.php2,109 ▲91.97 ▲0.0339.87 ▲2.5238.37 ▲6.09
Add New Post /wp-admin/post-new.php1,532 ▲123.39 ▲0.58645.90 ▼16.4560.82 ▼0.88
Media Library /wp-admin/upload.php1,409 ▲94.20 ▼0.0096.49 ▲3.0042.29 ▲0.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 158× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-language-switcher/vendor/composer/installers/src/Composer/Installers/PantheonInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'lloc\\Msls\\ContentImport\\Importers\\ImportersBaseFactory' not found in wp-content/plugins/multisite-language-switcher/includes/ContentImport/Importers/PostMetaImporters.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-language-switcher/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-language-switcher/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-language-switcher/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-language-switcher/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'lloc\\Msls\\MslsRegistryInstance' not found in wp-content/plugins/multisite-language-switcher/includes/ContentImport/MetaBox.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-language-switcher/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-language-switcher/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/multisite-language-switcher/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: multilingual, multisite, localization, switcher, language

multisite-language-switcher/MultisiteLanguageSwitcher.php 92% from 13 tests

"Multisite Language Switcher" version 2.6.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("multisite-language-switcher.php" instead of "MultisiteLanguageSwitcher.php")

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 detected50,346 lines of code in 746 files:
LanguageFilesBlank linesComment linesLines of code
SVG5140035,062
PHP1931,8203,9786,792
PO File282,2533,0176,528
CSS3001,564
JSON100160
YAML3313123
JavaScript32079
LESS11038

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity4.57
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces16
Interfaces4
Traits1
Classes176
▷ Abstract classes42.27%
▷ Concrete classes17297.73%
▷ Final classes00.00%
Methods493
▷ Static methods8116.43%
▷ Public methods41684.38%
▷ Protected methods6513.18%
▷ Private methods122.43%
Functions27
▷ Named functions622.22%
▷ Anonymous functions2177.78%
Constants23
▷ Global constants313.04%
▷ Class constants2086.96%
▷ Public constants20100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
250 compressed PNG files occupy 0.13MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
flags/fam.png0.52KB0.72KB0.00%
flags/cf.png0.60KB0.72KB0.00%
flags/la.png0.55KB0.70KB0.00%
flags/bt.png0.62KB0.70KB0.00%
flags/cg.png0.51KB0.62KB0.00%