90% bpdev-username-availability-checker

Code Review | WordPress Username Availability Checker

WordPress plugin WordPress Username Availability Checker scored90%from 54 tests.

About plugin

  • Plugin page: bpdev-username-av...
  • Plugin version: 1.1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 6.3.1
  • First release: Oct 24, 2015
  • Latest release: Jan 28, 2022
  • Number of updates: 10
  • Update frequency: every 229.0 days
  • Top authors: sbrajesh (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

300+ active /9,609 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.74ms] Passed 4 tests

A check of server-side resources used by WordPress Username Availability Checker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.07 ▲3.02
Dashboard /wp-admin3.32 ▲0.0249.67 ▲2.08
Posts /wp-admin/edit.php3.37 ▲0.0249.53 ▲0.43
Add New Post /wp-admin/post-new.php5.90 ▲0.0295.72 ▼4.97
Media Library /wp-admin/upload.php3.24 ▲0.0235.05 ▼0.48

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WordPress Username Availability Checker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.19 ▼1.611.65 ▼0.0241.34 ▼0.04
Dashboard /wp-admin2,209 ▲204.89 ▼0.02108.88 ▼4.3543.68 ▲2.07
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0440.29 ▲5.1334.20 ▼0.62
Add New Post /wp-admin/post-new.php1,520 ▼823.35 ▲0.15597.55 ▼79.0152.58 ▲3.52
Media Library /wp-admin/upload.php1,391 ▼04.23 ▼0.0194.82 ▼1.3841.28 ▼1.56

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: username, new user, buddypress, buddypress registration, registration

bpdev-username-availability-checker/username-availability-checker.php 92% from 13 tests

The main PHP script in "WordPress Username Availability Checker" version 1.1.8 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("bpdev-username-availability-checker.php" instead of "username-availability-checker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected263 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP15793149
JavaScript121446
PO File1121241
CSS15127

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods110.00%
▷ Public methods770.00%
▷ Protected methods00.00%
▷ Private methods330.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

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin