84% smart-custom-display-name

Code Review | Smart Custom Display Name

WordPress plugin Smart Custom Display Name scored84%from 54 tests.

About plugin

  • Plugin page: smart-custom-disp...
  • Plugin version: 5.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Aug 31, 2015
  • Latest release: Oct 3, 2023
  • Number of updates: 26
  • Update frequency: every 113.8 days
  • Top authors: petersplugins (80.77%)smartware.cc (23.08%)

Code review

54 tests

User reviews

5 reviews

Install metrics

400+ active /7,387 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.16MB] [CPU: ▲0.37ms] Passed 4 tests

Analyzing server-side resources used by Smart Custom Display Name
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1342.17 ▲0.74
Dashboard /wp-admin3.52 ▲0.2262.45 ▲7.69
Posts /wp-admin/edit.php3.57 ▲0.2251.93 ▲0.12
Add New Post /wp-admin/post-new.php6.04 ▲0.15102.68 ▼1.73
Media Library /wp-admin/upload.php3.38 ▲0.1540.57 ▲2.36
Smart Custom Display Name /wp-admin/options-general.php?page=smartcustomdisplaynamesettings3.3535.82

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Smart Custom Display Name
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.29 ▼1.021.70 ▲0.0843.55 ▼1.22
Dashboard /wp-admin2,210 ▲224.86 ▼0.95109.48 ▼3.7842.84 ▼0.65
Posts /wp-admin/edit.php2,093 ▲41.99 ▲0.0039.52 ▼2.1034.22 ▼4.32
Add New Post /wp-admin/post-new.php1,536 ▲2223.27 ▲5.71647.18 ▼36.4766.32 ▲9.09
Media Library /wp-admin/upload.php1,395 ▲74.23 ▲0.0097.25 ▼15.5743.70 ▼7.84
Smart Custom Display Name /wp-admin/options-general.php?page=smartcustomdisplaynamesettings8032.2130.4429.13

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • smart_custom_display_name_data
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_Class' not found in wp-content/plugins/smart-custom-display-name/inc/ppf/ppf-plugin.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_Class' not found in wp-content/plugins/smart-custom-display-name/inc/ppf/ppf-subclass.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_SubClass' not found in wp-content/plugins/smart-custom-display-name/inc/ppf/ppf-admin.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_Plugin' not found in wp-content/plugins/smart-custom-display-name/inc/ppf/ppf-plugin-addon.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_SubClass' not found in wp-content/plugins/smart-custom-display-name/inc/ppf/ppf-settings.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
You can take inspiration from this readme.txt

smart-custom-display-name/smart-custom-display-name.php Passed 13 tests

This is the main PHP file of "Smart Custom Display Name" version 5.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
44 characters long description:
Set users "Display Name" to any custom value

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin1,010 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP12637991684
CSS1510231
JavaScript2352290
SVG5005

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.24
Average class complexity7.75
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.51
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes675.00%
▷ Concrete classes225.00%
▷ Final classes00.00%
Methods83
▷ Static methods11.20%
▷ Public methods7185.54%
▷ Protected methods56.02%
▷ Private methods78.43%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants0
▷ Global constants00.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
No PNG files were detected