74% brozzme-change-username

Code Review | Brozzme Change Username

WordPress plugin Brozzme Change Username scored74%from 54 tests.

About plugin

  • Plugin page: brozzme-change-us...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.8
  • WordPress version: 6.3.1
  • First release: Apr 22, 2018
  • Latest release: Oct 28, 2021
  • Number of updates: 15
  • Update frequency: every 85.9 days
  • Top authors: Benoti (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /862 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▲9.52ms] Passed 4 tests

Analyzing server-side resources used by Brozzme Change Username
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.62 ▲0.1655.90 ▲15.00
Dashboard /wp-admin3.47 ▲0.1653.12 ▲5.60
Posts /wp-admin/edit.php3.58 ▲0.2274.95 ▲26.68
Add New Post /wp-admin/post-new.php6.07 ▲0.1899.62 ▲9.85
Media Library /wp-admin/upload.php3.39 ▲0.1638.45 ▲7.62
Change username /wp-admin/admin.php?page=brozzme-change-username3.3634.33
Brozzme /wp-admin/admin.php?page=brozzme-plugins3.50310.80
Change username /wp-admin/users.php?page=brozzme-change-username3.4431.19

Server storage [IO: ▲0.37MB] [DB: ▲0.02MB] Passed 3 tests

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

Browser metrics Passed 4 tests

Brozzme Change Username: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,834 ▲7713.17 ▼1.221.96 ▼0.0446.65 ▼4.45
Dashboard /wp-admin2,240 ▲495.85 ▲0.02110.24 ▲6.0252.88 ▲9.29
Posts /wp-admin/edit.php2,126 ▲402.03 ▲0.0348.40 ▲11.7638.39 ▲2.08
Add New Post /wp-admin/post-new.php1,543 ▲2917.49 ▼0.08638.73 ▼43.2452.62 ▲1.12
Media Library /wp-admin/upload.php1,425 ▲374.21 ▼0.03102.40 ▼1.6942.08 ▼8.64
Change username /wp-admin/admin.php?page=brozzme-change-username1,0072.3039.6828.10
Brozzme /wp-admin/admin.php?page=brozzme-plugins1,1282.0723.9741.26
Change username /wp-admin/users.php?page=brozzme-change-username1,0102.2534.9229.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'brozzme_change_username' does not have a method 'deactivate'
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/brozzme-change-username/brozzme_change_username.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes: The official readme.txt might help

brozzme-change-username/brozzme_change_username.php 92% from 13 tests

The entry point to "Brozzme Change Username" version 1.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("brozzme-change-username.php" instead of "brozzme_change_username.php")

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 detected4,232 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript66003962,890
PHP5224217765
CSS43617319
PO File28088258

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity25.25
▷ Minimum class complexity17.00
▷ Maximum class complexity34.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods41
▷ Static methods00.00%
▷ Public methods41100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
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
includes/img/logo-wps-200x200px.png30.17KB7.41KB▼ 75.43%