83% sml-simple-multilingual

Code Review | SML - Simple Multilingual - Translation & Language Switcher

WordPress plugin SML - Simple Multilingual - Translation & Language Switcher scored83%from 54 tests.

About plugin

  • Plugin page: sml-simple-multil...
  • Plugin version: 3.1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Mar 22, 2022
  • Latest release: May 6, 2022
  • Number of updates: 10
  • Update frequency: every 4.5 days
  • Top authors: marcgagnon (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /662 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.01MB] [CPU: ▼6.77ms] Passed 4 tests

An overview of server-side resources used by SML - Simple Multilingual - Translation & Language Switcher
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.40 ▼0.0637.08 ▼5.37
Dashboard /wp-admin3.32 ▲0.0150.64 ▼1.18
Posts /wp-admin/edit.php3.37 ▲0.0150.61 ▼5.21
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.93 ▼15.33
Media Library /wp-admin/upload.php3.24 ▲0.0139.11 ▲7.87
Simple Multilingual /wp-admin/options-general.php?page=Simple_Multilingual3.1831.86

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by SML - Simple Multilingual - Translation & Language Switcher
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,957 ▲17114.12 ▼0.5022.05 ▲19.8643.22 ▼2.97
Dashboard /wp-admin2,199 ▲225.59 ▼0.0293.85 ▲6.3238.27 ▼6.41
Posts /wp-admin/edit.php2,107 ▲71.97 ▼0.0141.98 ▲4.9134.37 ▼5.08
Add New Post /wp-admin/post-new.php1,538 ▲1218.10 ▼5.52613.70 ▲3.7863.50 ▲12.52
Media Library /wp-admin/upload.php1,407 ▲74.18 ▼0.03100.72 ▼8.5543.75 ▼1.99
Simple Multilingual /wp-admin/options-general.php?page=Simple_Multilingual9452.0327.8338.78

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
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=Simple_Multilingual
    • > Notice in wp-content/plugins/sml-simple-multilingual/plugin.php+61
    Trying to access array offset on value of type bool

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 86% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: translate, language switcher, multilingual, wpml, language...

sml-simple-multilingual/plugin.php 69% from 13 tests

This is the main PHP file of "SML - Simple Multilingual - Translation & Language Switcher" version 3.1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.7" instead of "4.0")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sml-simple-multilingual.php" instead of "plugin.php")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin535 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP29525304
JavaScript14127228
CSS1003

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
10 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flag_tr.png2.06KB0.97KB▼ 53.03%
images/flag_vi.png1.48KB0.57KB▼ 61.91%
images/flag_es.png1.38KB0.45KB▼ 67.09%
images/flag_de.png1.16KB0.31KB▼ 73.23%
images/flag_fr.png1.16KB0.34KB▼ 70.56%