90% show-user-avatar

Code Review | Show user avatar

WordPress plugin Show user avatar scored90%from 54 tests.

About plugin

  • Plugin page: show-user-avatar
  • 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 15, 2022
  • Latest release: Feb 25, 2023
  • Number of updates: 5
  • Update frequency: every 69.4 days
  • Top authors: haghs (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /387 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Show user avatar
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0042.53 ▲2.14
Dashboard /wp-admin3.31 ▼0.0447.19 ▼18.78
Posts /wp-admin/edit.php3.36 ▲0.0054.67 ▲7.38
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.16 ▼10.23
Media Library /wp-admin/upload.php3.24 ▲0.0035.03 ▼7.85

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Show user avatar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.25 ▼0.101.67 ▲0.0340.83 ▲0.59
Dashboard /wp-admin2,195 ▲185.57 ▼0.0284.90 ▼2.1838.81 ▼1.53
Posts /wp-admin/edit.php2,100 ▼02.02 ▼0.0139.83 ▲3.6535.52 ▼0.11
Add New Post /wp-admin/post-new.php1,526 ▼022.96 ▼0.12615.22 ▼76.8253.82 ▼21.41
Media Library /wp-admin/upload.php1,400 ▲64.20 ▼0.0096.63 ▼24.2041.60 ▼7.61

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
1 plugin tags: show user avatar

show-user-avatar/Show user avatar.php 92% from 13 tests

The main file in "Show user avatar" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("show-user-avatar.php" instead of "Show user avatar.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
Everything looks great! No dangerous files found in this plugin8 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12108

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected