84% wp-custom-avatar

Code Review | WP Custom Avatar

WordPress plugin WP Custom Avatar scored84%from 54 tests.

About plugin

  • Plugin page: wp-custom-avatar
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-6.1
  • WordPress version: 6.3.1
  • First release: Aug 21, 2015
  • Latest release: Dec 23, 2022
  • Number of updates: 24
  • Update frequency: every 111.8 days
  • Top authors: Hareesh Pillai (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

800+ active /10,618 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

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

Analyzing server-side resources used by WP Custom Avatar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.88 ▼7.91
Dashboard /wp-admin3.31 ▲0.0151.27 ▼5.19
Posts /wp-admin/edit.php3.36 ▲0.0151.08 ▼2.31
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.90 ▼17.51
Media Library /wp-admin/upload.php3.24 ▲0.0141.25 ▲0.03

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

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

Browser metrics Passed 4 tests

WP Custom Avatar: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▲0.001.69 ▼0.2042.55 ▼4.42
Dashboard /wp-admin2,195 ▲185.61 ▲0.0285.36 ▼2.5242.68 ▲1.46
Posts /wp-admin/edit.php2,103 ▲31.98 ▼0.0436.73 ▲3.0339.09 ▼2.89
Add New Post /wp-admin/post-new.php1,526 ▼223.51 ▲0.40700.73 ▲78.8166.11 ▲13.91
Media Library /wp-admin/upload.php1,400 ▲34.25 ▲0.06109.78 ▼12.3148.52 ▼0.04

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

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 | 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_action() in wp-content/plugins/wp-custom-avatar/wp-custom-avatar.php:47

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: user logo, plugins, plugin, custom avatar, gravatar

wp-custom-avatar/wp-custom-avatar.php Passed 13 tests

The principal PHP file in "WP Custom Avatar" v. 1.2.1 is loaded by WordPress automatically on each request
56 characters long description:
Replace Default Avatar with custom image of your choice.

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
There were no executable files found in this plugin26 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1132326

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No 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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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