52% wp-user-avatar

Code Review | Paid Membership Plugin, Ecommerce, Registration Form, Login Form, User Profile & Restrict Content – ProfilePress

WordPress plugin Paid Membership Plugin, Ecommerce, Registration Form, Login Form, User Profile & Restrict Content – ProfilePress scored52%from 54 tests.

About plugin

  • Plugin page: wp-user-avatar
  • Plugin version: 4.14.0
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.4
  • WordPress version: 6.3.1
  • First release: Jan 14, 2013
  • Latest release: Nov 7, 2023
  • Number of updates: 424
  • Update frequency: every 9.3 days
  • Top authors: Collizo4sky (48.58%)bangbay (36.32%)flippercode (15.57%)

Code review

54 tests

User reviews

862 reviews

Install metrics

200,000+ active /12,019,159 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲6.96MB] [CPU: ▲29.27ms] 50% from 4 tests

An overview of server-side resources used by Paid Membership Plugin, Ecommerce, Registration Form, Login Form, User Profile & Restrict Content – ProfilePress
Please have a look at the following items
  • RAM: Try to keep total memory usage under 10MB (currently 10.86MB on /wp-admin/admin.php?page=ppress-customers)
  • Extra RAM: Extra memory usage must be kept under 5MB (currently 6.96MB on /wp-admin/admin.php?page=ppress-customers)
PageMemory (MB)CPU Time (ms)
Home /8.98 ▲5.5271.79 ▲21.14
Dashboard /wp-admin10.67 ▲7.3688.49 ▲39.07
Posts /wp-admin/edit.php11.01 ▲7.6598.26 ▲51.64
Add New Post /wp-admin/post-new.php13.45 ▲7.56115.89 ▲11.94
Media Library /wp-admin/upload.php10.64 ▲7.4181.37 ▲44.94
Membership Plans /wp-admin/admin.php?page=ppress-plans10.9283.31
Subscriptions /wp-admin/admin.php?page=ppress-subscriptions10.8785.89
Settings /wp-admin/admin.php?page=ppress-config10.6172.39
Member Directories /wp-admin/admin.php?page=ppress-directories10.8679.70
Popups & Optins /wp-admin/admin.php?page=ppress-mailoptin10.6776.17
Dashboard /wp-admin/admin.php?page=ppress-dashboard14.07120.60
Forms & Profiles /wp-admin/admin.php?page=ppress-forms10.8681.62
Content Protection /wp-admin/admin.php?page=ppress-content-protection10.7775.50
Orders /wp-admin/admin.php?page=ppress-orders10.9478.53
Customers /wp-admin/admin.php?page=ppress-customers10.8678.83

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2,137 new files
Database: 10 new tables, 27 new options
New tables
wp_ppress_customers
wp_ppress_orders
wp_ppress_forms
wp_ppress_sessions
wp_ppress_ordermeta
wp_ppress_formsmeta
wp_ppress_plans
wp_ppress_coupons
wp_ppress_subscriptions
wp_ppress_meta_data
New WordPress options
wp_user_avatar_resize_upload
widget_recent-comments
ppress_settings_data
ppress_new_v4_install
db_upgraded
wp_user_cover_upload_size_limit
wp_user_avatar_resize_h
widget_pp_form
ppress_install_date
wp_user_avatar_upload_size_limit
...

Browser metrics Passed 4 tests

Checking browser requirements for Paid Membership Plugin, Ecommerce, Registration Form, Login Form, User Profile & Restrict Content – ProfilePress
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,126 ▲36414.24 ▼0.4712.13 ▲10.0536.71 ▼6.76
Dashboard /wp-admin2,431 ▲2544.90 ▼0.73101.40 ▲8.6249.44 ▲8.83
Posts /wp-admin/edit.php2,309 ▲2122.64 ▲0.7044.19 ▲9.5337.83 ▲5.42
Add New Post /wp-admin/post-new.php1,631 ▲10522.26 ▼1.21776.23 ▲73.2038.88 ▼27.49
Media Library /wp-admin/upload.php1,621 ▲2214.36 ▲0.20103.08 ▲0.7243.20 ▼1.11
Membership Plans /wp-admin/admin.php?page=ppress-plans1,6694.8493.5040.62
Subscriptions /wp-admin/admin.php?page=ppress-subscriptions2,2575.3795.1132.46
Settings /wp-admin/admin.php?page=ppress-config1,5374.7372.0372.67
Member Directories /wp-admin/admin.php?page=ppress-directories1,5534.6165.6929.40
Popups & Optins /wp-admin/admin.php?page=ppress-mailoptin1,3314.6859.1146.87
Dashboard /wp-admin/admin.php?page=ppress-dashboard2,0989.28209.8845.69
Forms & Profiles /wp-admin/admin.php?page=ppress-forms1,6064.7963.0833.39
Content Protection /wp-admin/admin.php?page=ppress-content-protection1,4944.7564.5234.18
Orders /wp-admin/admin.php?page=ppress-orders2,2445.1586.2636.12
Customers /wp-admin/admin.php?page=ppress-customers2,11512.23127.2937.11

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure failed, leaving 10 tables in the database
    • wp_ppress_forms
    • wp_ppress_plans
    • wp_ppress_sessions
    • wp_ppress_customers
    • wp_ppress_coupons
    • wp_ppress_orders
    • wp_ppress_ordermeta
    • wp_ppress_meta_data
    • wp_ppress_formsmeta
    • wp_ppress_subscriptions
  • Zombie WordPress options were found after uninstall: 27 options
    • widget_wp_user_avatar_profile
    • wp_user_avatar_users_updated
    • db_upgraded
    • widget_pp_form
    • wp_user_avatar_default_avatar_updated
    • wp_user_avatar_disable_gravatar
    • wp_user_avatar_upload_size_limit
    • theysaidso_admin_options
    • widget_pp_tabbed_widget
    • ppress_plugin_activated
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=ppress-config
    • > Notice in wp-content/plugins/wp-user-avatar/src/Functions/custom-settings-api.php+553
    Undefined index: description

SRP 0% 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 take a closer look at the following
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-user-avatar/wp-user-avatar.php
    • > /wp-content/plugins/wp-user-avatar/deprecated/wp-user-avatar/wp-user-avatar.php
    • > /wp-content/plugins/wp-user-avatar/src/Admin/SettingsPages/Membership/views/subscriptions/subscription-notes-sidebar.php
    • > /wp-content/plugins/wp-user-avatar/deprecated/wp-user-avatar/includes/tinymce/window.php
    • > /wp-content/plugins/wp-user-avatar/src/Admin/SettingsPages/Membership/views/orders/order-notes-sidebar.php
  • 709× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'ProfilePress\\Core\\Themes\\DragDrop\\AbstractTheme' not found in wp-content/plugins/wp-user-avatar/src/Themes/DragDrop/UserProfile/DefaultTemplate.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'ProfilePressVendor\\Stripe\\ApiResource' not found in wp-content/plugins/wp-user-avatar/third-party/vendor/stripe/stripe-php/lib/Recipient.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'ProfilePressVendor\\Stripe\\ApiResource' not found in wp-content/plugins/wp-user-avatar/third-party/vendor/stripe/stripe-php/lib/CreditNote.php:39
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-user-avatar/src/Admin/SettingsPages/Membership/views/checkout-fields.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'ProfilePressVendor\\Carbon\\CarbonConverterInterface' not found in wp-content/plugins/wp-user-avatar/third-party/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php:187
    • > PHP Fatal error
      Uncaught Error: Class 'ProfilePressVendor\\Pelago\\Emogrifier\\HtmlProcessor\\AbstractHtmlProcessor' not found in wp-content/plugins/wp-user-avatar/third-party/vendor/pelago/emogrifier/src/HtmlProcessor/CssToAttributeConverter.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'ProfilePressVendor\\Stripe\\Exception\\ApiErrorException' not found in wp-content/plugins/wp-user-avatar/third-party/vendor/stripe/stripe-php/lib/Exception/AuthenticationException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ProfilePress\\Core\\Admin\\SettingsPages\\AbstractSettingsPage' not found in wp-content/plugins/wp-user-avatar/src/Admin/SettingsPages/Membership/DashboardPage/SettingsPage.php:18
    • > PHP Fatal error
      Uncaught ReflectionException: Class ProfilePressVendor\\Symfony\\Component\\Translation\\Formatter\\MessageFormatterInterface does not exist in wp-content/plugins/wp-user-avatar/third-party/vendor/nesbot/carbon/src/Carbon/MessageFormatter/MessageFormatterMapper.php:17
    • > PHP Fatal error
      Uncaught Error: Interface 'ProfilePressVendor\\Symfony\\Contracts\\Translation\\TranslatorInterface' not found in wp-content/plugins/wp-user-avatar/third-party/vendor/symfony/translation/LoggingTranslator.php:20

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

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 20 tag instead of maximum 10
The official readme.txt is a good inspiration

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

"Paid Membership Plugin, Ecommerce, Registration Form, Login Form, User Profile & Restrict Content – ProfilePress" version 4.14.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
56 characters long description:
The modern WordPress membership and user profile plugin.

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/wp-user-avatar/third-party/vendor/stripe/stripe-php/data/ca-certificates.crt
    • .bat - Batch File in Windows
      • wp-content/plugins/wp-user-avatar/third-party/vendor/nesbot/carbon/bin/carbon.bat
126,592 lines of code in 1,769 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,66715,77451,99395,968
JavaScript492,0391,37513,617
CSS171,3231428,045
JSON8006,041
XSD392482,803
SVG230188
Bourne Shell13026
DOS Batch1004

PHP code 50% from 2 tests

A short review of cyclomatic complexity and code structure
Please fix the following
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 140)
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity11.44
▷ Minimum class complexity1.00
▷ Maximum class complexity351.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity140.00
Code structure
Namespaces155
Interfaces62
Traits40
Classes823
▷ Abstract classes475.71%
▷ Concrete classes77694.29%
▷ Final classes253.22%
Methods6,088
▷ Static methods1,24120.38%
▷ Public methods5,45989.67%
▷ Protected methods2864.70%
▷ Private methods3435.63%
Functions874
▷ Named functions34739.70%
▷ Anonymous functions52760.30%
Constants1,252
▷ Global constants655.19%
▷ Class constants1,18794.81%
▷ Public constants1,16698.23%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
95 compressed PNG files occupy 1.73MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/monochrome/instagram.png0.65KB0.65KB0.00%
assets/images/parallel/linkedin.png0.92KB0.96KB0.00%
assets/images/monochrome/flickr.png0.52KB0.52KB0.00%
assets/images/themes/smiley-password-reset.png30.66KB33.51KB0.00%
assets/images/themes/pinnacle-edit-profile.png6.43KB7.50KB0.00%