90% language-switcher-for-elementor

Code Review | Language Switcher for Elementor

WordPress plugin Language Switcher for Elementor scored90%from 54 tests.

About plugin

  • Plugin page: language-switcher...
  • Plugin version: 1.0.5
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.9
  • WordPress version: 6.3.1
  • First release: Jul 10, 2018
  • Latest release: Mar 23, 2022
  • Number of updates: 19
  • Update frequency: every 71.2 days
  • Top authors: solitweb (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

1,000+ active /32,327 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼3.13ms] Passed 4 tests

An overview of server-side resources used by Language Switcher for Elementor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0034.00 ▲0.83
Dashboard /wp-admin3.31 ▲0.0045.10 ▼2.85
Posts /wp-admin/edit.php3.36 ▲0.0045.70 ▼3.90
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.23 ▼6.58
Media Library /wp-admin/upload.php3.23 ▲0.0035.32 ▲3.35

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Language Switcher for Elementor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.10 ▼0.281.89 ▲0.2942.10 ▼3.04
Dashboard /wp-admin2,195 ▲185.65 ▲0.0787.50 ▲1.0438.50 ▼4.18
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0635.98 ▲2.3733.37 ▼6.61
Add New Post /wp-admin/post-new.php1,526 ▼623.25 ▲0.34653.51 ▲10.9550.46 ▼7.19
Media Library /wp-admin/upload.php1,400 ▲34.24 ▲0.1096.59 ▲1.9142.87 ▼0.36

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: language switcher, menu, pagebuilder, wpml, translate...

language-switcher-for-elementor/language-switcher-for-elementor.php Passed 13 tests

The main PHP file in "Language Switcher for Elementor" ver. 1.0.5 adds more information about the plugin and also serves as the entry point for this plugin
74 characters long description:
This plugin adds a language switcher widget to the Elementor Page Builder.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin799 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP4142335556
CSS430243

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity9.33
▷ Minimum class complexity5.00
▷ Maximum class complexity13.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes133.33%
Methods27
▷ Static methods13.70%
▷ Public methods2074.07%
▷ Protected methods311.11%
▷ Private methods414.81%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin