83% r3df-dashboard-language-switcher

Code Review | R3DF Dashboard Language Switcher

WordPress plugin R3DF Dashboard Language Switcher scored83%from 54 tests.

About plugin

  • Plugin page: r3df-dashboard-la...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.1
  • WordPress version: 6.3.1
  • First release: Apr 10, 2015
  • Latest release: Apr 12, 2015
  • Number of updates: 23
  • Update frequency: every 0.1 days
  • Top authors: r3df (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

500+ active /13,947 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.24MB] [CPU: ▼11.59ms] Passed 4 tests

An overview of server-side resources used by R3DF Dashboard Language Switcher
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1332.74 ▼8.40
Dashboard /wp-admin3.61 ▲0.3151.31 ▼21.78
Posts /wp-admin/edit.php3.64 ▲0.2950.97 ▼5.46
Add New Post /wp-admin/post-new.php6.11 ▲0.2290.83 ▼10.73
Media Library /wp-admin/upload.php3.61 ▲0.3941.37 ▲0.25
Dashboard Language /wp-admin/options-general.php?page=r3df-dashboard-language-switcher3.6234.88

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

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

Browser metrics Passed 4 tests

Checking browser requirements for R3DF Dashboard Language Switcher
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.70 ▲0.352.12 ▲0.3844.17 ▲3.47
Dashboard /wp-admin2,205 ▲315.62 ▼0.0393.03 ▲5.6137.12 ▼2.48
Posts /wp-admin/edit.php2,116 ▲132.10 ▲0.1237.97 ▼5.9235.42 ▲0.78
Add New Post /wp-admin/post-new.php1,413 ▼12217.87 ▼0.45596.66 ▼52.9454.34 ▼8.11
Media Library /wp-admin/upload.php1,419 ▲194.19 ▼0.0499.11 ▼21.3842.67 ▼6.89
Dashboard Language /wp-admin/options-general.php?page=r3df-dashboard-language-switcher9562.0323.2730.59

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=r3df-dashboard-language-switcher
    • > Notice in wp-content/plugins/r3df-dashboard-language-switcher/r3df-dashboard-language-switcher.php+792
    Undefined index: en_US
    • > GET request to /wp-admin/options-general.php?page=r3df-dashboard-language-switcher
    • > Notice in wp-content/plugins/r3df-dashboard-language-switcher/r3df-dashboard-language-switcher.php+938
    Only variables should be passed by reference

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (The admin toolbar language selector.) image required
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
Please take inspiration from this readme.txt

r3df-dashboard-language-switcher/r3df-dashboard-language-switcher.php 92% from 13 tests

The primary PHP file in "R3DF Dashboard Language Switcher" version 1.0.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected1,233 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS260602
PHP3136367538
PO File1314093

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.49
Average class complexity98.00
▷ Minimum class complexity98.00
▷ Maximum class complexity98.00
Average method complexity3.20
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods44
▷ Static methods00.00%
▷ Public methods44100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png33.09KB13.11KB▼ 60.38%