84% jsm-user-locale

Code Review | JSM User Locale Selector

WordPress plugin JSM User Locale Selector scored 84% from 54 tests.

About plugin

  • Plugin page: jsm-user-locale
  • Plugin version: 2.2.1
  • PHP compatiblity: 7.2.34+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Dec 14, 2016
  • Latest release: Aug 29, 2023
  • Number of updates: 615
  • Update frequency: every 4.0 days
  • Top authors: jsmoriss (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

20+ active / 4,795 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
Install script ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▼27.76ms] Passed 4 tests

Analyzing server-side resources used by JSM User Locale Selector
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2843.57 ▼35.60
Dashboard /wp-admin3.54 ▲0.2348.71 ▼2.33
Posts /wp-admin/edit.php3.60 ▲0.2448.25 ▼25.43
Add New Post /wp-admin/post-new.php5.94 ▲0.0691.47 ▼44.02
Media Library /wp-admin/upload.php3.54 ▲0.3137.25 ▼5.97

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

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

Browser metrics Passed 4 tests

Checking browser requirements for JSM User Locale Selector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6013.56 ▼0.931.82 ▼0.23553.38 ▲430.14
Dashboard /wp-admin2,226 ▲254.83 ▼0.08101.64 ▼111.6639.55 ▼171.81
Posts /wp-admin/edit.php2,109 ▲202.04 ▼0.0135.37 ▼54.5231.05 ▼164.60
Add New Post /wp-admin/post-new.php1,530 ▲12223.19 ▲5.09617.07 ▼495.3248.57 ▼99.63
Media Library /wp-admin/upload.php1,402 ▲174.19 ▲0.0899.91 ▼145.1546.00 ▼112.82

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/jsm-user-locale/jsm-user-locale.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: back-end, admin, select, locale, front-end...

jsm-user-locale/jsm-user-locale.php Passed 13 tests

The primary PHP file in "JSM User Locale Selector" version 2.2.1 is used by WordPress to initiate all plugin functionality
113 characters long description:
Add a quick and easy user locale / language selector in the WordPress admin back-end and front-end toolbar menus.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected385 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP110234338
PO File181028
Markdown19019

PHP code Passed 2 tests

Analyzing 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.64
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods114.29%
▷ Public methods685.71%
▷ Protected methods00.00%
▷ Private methods114.29%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
No PNG images were found in this plugin