84% show-user-name

Code Review | Show user name

WordPress plugin Show user name scored84%from 54 tests.

About plugin

  • Plugin page: show-user-name
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.4-6.1
  • WordPress version: 6.3.1
  • First release: Mar 17, 2022
  • Latest release: Feb 25, 2023
  • Number of updates: 6
  • Update frequency: every 57.5 days
  • Top authors: haghs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /851 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.88ms] Passed 4 tests

This is a short check of server-side resources used by Show user name
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0040.57 ▲0.14
Dashboard /wp-admin3.31 ▲0.0050.69 ▼3.67
Posts /wp-admin/edit.php3.36 ▲0.0049.83 ▼4.91
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.89 ▼15.09
Media Library /wp-admin/upload.php3.23 ▲0.0036.77 ▲2.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Show user name
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.32 ▼1.061.69 ▲0.0243.32 ▲0.93
Dashboard /wp-admin2,209 ▲215.84 ▲0.9298.08 ▼11.4343.83 ▼3.99
Posts /wp-admin/edit.php2,089 ▼32.02 ▼0.0435.77 ▼6.6631.77 ▼5.35
Add New Post /wp-admin/post-new.php1,542 ▲923.43 ▲0.26675.57 ▼17.0052.13 ▼2.33
Media Library /wp-admin/upload.php1,391 ▼04.24 ▲0.00115.84 ▲16.1947.78 ▲2.58

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts

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)
Even though no errors were found, 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
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/show-user-name/ShowUserName.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
1 plugin tags: show user name

show-user-name/ShowUserName.php 92% from 13 tests

"Show user name" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("show-user-name.php" instead of "ShowUserName.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
No dangerous file extensions were detected9 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11109

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin