89% username-changer

Code Review | Username Changer

WordPress plugin Username Changer scored89%from 54 tests.

About plugin

  • Plugin page: username-changer
  • Plugin version: 3.2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.4.1
  • WordPress version: 6.3.1
  • First release: May 15, 2012
  • Latest release: May 25, 2020
  • Number of updates: 39
  • Update frequency: every 75.2 days
  • Top authors: ghost1227 (38.46%)evertiro (35.9%)section214 (30.77%)

Code review

54 tests

User reviews

68 reviews

Install metrics

30,000+ active /366,496 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 gracefully, with no errors

Server metrics [RAM: ▲0.50MB] [CPU: ▼3.09ms] Passed 4 tests

An overview of server-side resources used by Username Changer
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.4841.10 ▲4.02
Dashboard /wp-admin3.86 ▲0.5249.09 ▼8.96
Posts /wp-admin/edit.php3.91 ▲0.5646.73 ▼0.87
Add New Post /wp-admin/post-new.php6.40 ▲0.5191.18 ▼6.54
Media Library /wp-admin/upload.php3.72 ▲0.4938.65 ▲5.99
Username Changer /wp-admin/options-general.php?page=username_changer-settings3.7739.37

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 36 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
username_changer_settings
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Username Changer
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲4013.21 ▼1.194.89 ▲3.1241.44 ▲0.12
Dashboard /wp-admin2,214 ▲284.90 ▼0.99105.76 ▼10.1144.68 ▼0.44
Posts /wp-admin/edit.php2,103 ▲112.03 ▼0.0241.80 ▲0.6935.54 ▲1.72
Add New Post /wp-admin/post-new.php1,524 ▲523.16 ▲0.13643.24 ▼26.4954.82 ▲3.72
Media Library /wp-admin/upload.php1,393 ▲24.23 ▲0.0195.79 ▼4.7140.95 ▼6.31
Username Changer /wp-admin/options-general.php?page=username_changer-settings1,7168.67203.3765.20

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • username_changer_settings
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: login, user, username, display name

username-changer/class-username-changer.php 77% from 13 tests

"Username Changer" version 3.2.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("username-changer.php" instead of "class-username-changer.php")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")
  • Domain Path: You should use only dashes and lowercase characters for the domain path ("languages")

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 detected3,342 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP111,1362,2422,836
JavaScript46120282
CSS6161682
SVG10178
Markdown439064

PHP code Passed 2 tests

Analyzing 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.39
Average class complexity64.71
▷ Minimum class complexity7.00
▷ Maximum class complexity161.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity36.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes114.29%
Methods136
▷ Static methods10.74%
▷ Public methods12491.18%
▷ Protected methods21.47%
▷ Private methods107.35%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.24MB with 0.18MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png248.15KB63.24KB▼ 74.51%