84% force-first-last

Code Review | Force First and Last Name as Display Name

WordPress plugin Force First and Last Name as Display Name scored84%from 54 tests.

About plugin

  • Plugin page: force-first-last
  • Plugin version: 1.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2
  • WordPress version: 6.3.1
  • First release: Sep 6, 2013
  • Latest release: Mar 15, 2023
  • Number of updates: 11
  • Update frequency: every 316.1 days
  • Top authors: strangerstudios (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

3,000+ active /23,931 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.28ms] Passed 4 tests

Analyzing server-side resources used by Force First and Last Name as Display Name
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.66 ▲3.38
Dashboard /wp-admin3.32 ▲0.0147.56 ▲3.50
Posts /wp-admin/edit.php3.37 ▲0.0146.72 ▲0.81
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.72 ▼10.05
Media Library /wp-admin/upload.php3.24 ▲0.0134.75 ▲0.74
Force First Last /wp-admin/options-general.php?page=ffl_settings3.2029.80

Server storage [IO: ▲0.03MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Force First and Last Name as Display Name
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.34 ▼1.041.88 ▲0.2643.32 ▲2.47
Dashboard /wp-admin2,210 ▲275.85 ▲0.75110.77 ▼33.0941.46 ▼12.16
Posts /wp-admin/edit.php2,093 ▲12.05 ▲0.0633.42 ▼9.2136.39 ▲1.03
Add New Post /wp-admin/post-new.php1,540 ▼223.16 ▲4.89642.83 ▼0.4951.12 ▼8.82
Media Library /wp-admin/upload.php1,389 ▲74.23 ▲0.0394.17 ▲0.6543.83 ▲0.74
Force First Last /wp-admin/options-general.php?page=ffl_settings8222.0125.0127.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/force-first-last/force-first-last.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: force, user, last name, first name, display name

force-first-last/force-first-last.php Passed 13 tests

The primary PHP file in "Force First and Last Name as Display Name" version 1.2.1 is used by WordPress to initiate all plugin functionality
78 characters long description:
Force the user field display_name to be set as the user's first and last name.

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
Everything looks great! No dangerous files found in this plugin175 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP11855154
Bourne Shell10821

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/Stranger-Studios.png13.11KB7.51KB▼ 42.74%