84% wp-edit-username

Code Review | WP Edit Username

WordPress plugin WP Edit Username scored84%from 54 tests.

About plugin

  • Plugin page: wp-edit-username
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.3
  • WordPress version: 6.3.1
  • First release: Apr 26, 2018
  • Latest release: Oct 9, 2023
  • Number of updates: 23
  • Update frequency: every 86.6 days
  • Top authors: sajjad67 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

800+ active /5,937 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼4.91ms] Passed 4 tests

An overview of server-side resources used by WP Edit Username
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0343.85 ▼0.37
Dashboard /wp-admin3.35 ▲0.0447.82 ▲0.31
Posts /wp-admin/edit.php3.40 ▲0.0446.09 ▼8.48
Add New Post /wp-admin/post-new.php5.93 ▲0.0493.97 ▼10.73
Media Library /wp-admin/upload.php3.27 ▲0.0436.91 ▼0.06

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Edit Username
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.22 ▼0.421.72 ▲0.0140.97 ▼4.92
Dashboard /wp-admin2,211 ▲315.57 ▼0.1287.84 ▼0.1541.17 ▲0.69
Posts /wp-admin/edit.php2,119 ▲161.99 ▲0.0240.32 ▲0.2535.61 ▲0.63
Add New Post /wp-admin/post-new.php1,539 ▲1323.69 ▲0.07650.90 ▼4.0767.27 ▲12.40
Media Library /wp-admin/upload.php1,410 ▲104.19 ▼0.04101.01 ▼4.6046.98 ▲2.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-edit-username/admin/ajax-handler.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-edit-username/includes/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-edit-username/admin/modal.php:3

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

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: username, profile-edit, change-username, user-profile, edit...

wp-edit-username/wp-edit-username.php Passed 13 tests

Analyzing the main PHP file in "WP Edit Username" version 1.0.5
60 characters long description:
Change Wordpress User's Username From Edit User Admin Panel.

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
No dangerous file extensions were detected7,914 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS21,02177,589
PHP510191265
JavaScript3221060

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/icon/Users-Edit-User-icon.png6.74KB2.22KB▼ 67.00%