84% basic-user-avatars

Code Review | Basic User Avatars

WordPress plugin Basic User Avatars scored84%from 54 tests.

About plugin

  • Plugin page: basic-user-avatars
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: Jan 5, 2014
  • Latest release: Aug 11, 2023
  • Number of updates: 27
  • Update frequency: every 133.5 days
  • Top authors: andrewza (40.74%)jaredatch (40.74%)strangerstudios (25.93%)

Code review

54 tests

User reviews

38 reviews

Install metrics

10,000+ active /112,712 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.08MB] [CPU: ▼10.07ms] Passed 4 tests

An overview of server-side resources used by Basic User Avatars
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.20 ▼2.72
Dashboard /wp-admin3.39 ▲0.0552.69 ▼12.43
Posts /wp-admin/edit.php3.44 ▲0.0949.17 ▼4.81
Add New Post /wp-admin/post-new.php5.97 ▲0.0988.13 ▼20.33
Media Library /wp-admin/upload.php3.31 ▲0.0938.60 ▲2.80

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 19 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Basic User Avatars: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.79 ▲0.441.76 ▼0.2039.45 ▼2.79
Dashboard /wp-admin2,203 ▲155.77 ▲0.69101.24 ▼5.9839.62 ▲0.75
Posts /wp-admin/edit.php2,089 ▼32.02 ▲0.0033.53 ▼10.0734.20 ▼1.07
Add New Post /wp-admin/post-new.php1,534 ▲2023.24 ▼0.61612.33 ▼16.5259.11 ▲5.89
Media Library /wp-admin/upload.php1,391 ▲34.19 ▲0.0394.03 ▼12.2946.48 ▲1.97

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/basic-user-avatars/init.php:86

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention: The official readme.txt is a good inspiration

basic-user-avatars/init.php 92% from 13 tests

"Basic User Avatars" version 1.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("basic-user-avatars.php" instead of "init.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected768 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PO File8110126489
PHP180194279

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity54.00
▷ Minimum class complexity54.00
▷ Maximum class complexity54.00
Average method complexity4.46
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
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
There were not PNG files found in your plugin