84% user-avatar-for-woocommerce

Code Review | User Avatar For Woocommerce

WordPress plugin User Avatar For Woocommerce scored84%from 54 tests.

About plugin

  • Plugin page: user-avatar-for-w...
  • Plugin version: 1.0.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.6
  • WordPress version: 6.3.1
  • First release: Feb 4, 2021
  • Latest release: Feb 6, 2021
  • Number of updates: 8
  • Update frequency: every 0.3 days
  • Top authors: 4wpbari (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /1,438 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
Install script ran successfully

Server metrics [RAM: ▼0.13MB] [CPU: ▼7.22ms] Passed 4 tests

A check of server-side resources used by User Avatar For Woocommerce
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.86 ▼0.6020.63 ▼23.01
Dashboard /wp-admin3.34 ▲0.0351.12 ▼2.35
Posts /wp-admin/edit.php3.39 ▲0.0351.33 ▲1.26
Add New Post /wp-admin/post-new.php5.92 ▲0.0398.39 ▲5.20
Media Library /wp-admin/upload.php3.26 ▲0.0338.76 ▼4.76

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
avatar_woocommerce_impostazioni

Browser metrics Passed 4 tests

An overview of browser requirements for User Avatar For Woocommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,461 ▼30014.66 ▲0.400.47 ▼1.4823.08 ▼22.14
Dashboard /wp-admin2,208 ▲285.65 ▼0.0291.60 ▼8.9143.07 ▲1.31
Posts /wp-admin/edit.php2,116 ▲192.02 ▲0.0140.17 ▲3.1634.74 ▼1.31
Add New Post /wp-admin/post-new.php1,539 ▲1123.21 ▲0.29617.41 ▼69.4962.28 ▲7.90
Media Library /wp-admin/upload.php1,416 ▲194.18 ▲0.02106.07 ▼6.0147.57 ▼1.64

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • avatar_woocommerce_impostazioni

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_option() in wp-content/plugins/user-avatar-for-woocommerce/user-avatar-for-woocommerce.php:98

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: avatar, woocommerce, picture profile

user-avatar-for-woocommerce/user-avatar-for-woocommerce.php 92% from 13 tests

The entry point to "User Avatar For Woocommerce" version 1.0.1 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin586 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1127210461
PO File23034125

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity28.50
▷ Minimum class complexity16.00
▷ Maximum class complexity41.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.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 images were found in this plugin