61% armember-membership

Code Review | ARMember - Membership Plugin, Content Restriction, Member Levels, User Profile & User signup

WordPress plugin ARMember - Membership Plugin, Content Restriction, Member Levels, User Profile & User signup scored61%from 54 tests.

About plugin

  • Plugin page: armember-membership
  • Plugin version: 4.0.18
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2018
  • Latest release: Nov 20, 2023
  • Number of updates: 140
  • Update frequency: every 14.9 days
  • Top authors: reputeinfosystems (100%)

Code review

54 tests

User reviews

66 reviews

Install metrics

5,000+ active /138,145 total downloads

Benchmarks

Plugin footprint 81% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲11.17MB] [CPU: ▲64.60ms] 25% from 4 tests

Analyzing server-side resources used by ARMember - Membership Plugin, Content Restriction, Member Levels, User Profile & User signup
Please take the time to fix the following items
  • RAM: You should keep total memory usage under 10MB (currently 14.37MB on /wp-admin/admin.php?page=arm_manage_plans)
  • CPU: Total CPU usage should be kept under 500.00ms (currently 732.08ms on /wp-admin/admin.php?page=arm_feature_settings)
  • Extra RAM: The extra memory usage must be under 5MB (currently 11.17MB on /wp-admin/admin.php?page=arm_manage_plans)
PageMemory (MB)CPU Time (ms)
Home /14.58 ▲11.12108.33 ▲61.62
Dashboard /wp-admin14.52 ▲11.17130.86 ▲71.99
Posts /wp-admin/edit.php14.58 ▲11.22111.56 ▲60.42
Add New Post /wp-admin/post-new.php17.33 ▲11.44157.22 ▲64.37
Media Library /wp-admin/upload.php14.39 ▲11.16114.16 ▲80.30
Modules /wp-admin/admin.php?page=arm_feature_settings14.60732.08
Payment History /wp-admin/admin.php?page=arm_transactions14.43118.74
Content Access Rules /wp-admin/admin.php?page=arm_access_rules14.43120.53
Configure Plan + Signup Page /wp-admin/admin.php?page=arm_membership_setup14.59119.14
Documentation /wp-admin/admin.php?page=arm_documentation14.28111.24
Manage Members /wp-admin/admin.php?page=arm_manage_members14.4599.68
Manage Subscriptions /wp-admin/admin.php?page=arm_manage_subscriptions14.49113.44
Growth Plugins /wp-admin/admin.php?page=arm_growth_plugins14.34122.71
Upgrade to Pro /wp-admin/admin.php?page=arm_upgrade_to_premium14.28108.05
Manage Plans /wp-admin/admin.php?page=arm_manage_plans14.37112.78

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 556 new files
Database: 14 new tables, 17 new options
New tables
wp_arm_member_templates
wp_arm_membership_setup
wp_arm_activity
wp_arm_email_templates
wp_arm_forms
wp_arm_termmeta
wp_arm_fail_attempts
wp_arm_entries
wp_arm_payment_log
wp_arm_members
...
New WordPress options
arm_global_settings
arm_redirection_settings
armlite_version
arm_show_document_video
can_compress_scripts
widget_recent-posts
widget_arm_member_form_widget
widget_arm_member_form_widget_latest_members
widget_recent-comments
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

An overview of browser requirements for ARMember - Membership Plugin, Content Restriction, Member Levels, User Profile & User signup
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,405 ▲64314.44 ▲0.102.15 ▲0.4046.22 ▲2.48
Dashboard /wp-admin2,771 ▲5915.85 ▲0.20103.72 ▲10.56105.61 ▲59.96
Posts /wp-admin/edit.php2,131 ▲282.02 ▲0.0138.15 ▼3.0532.84 ▼3.65
Add New Post /wp-admin/post-new.php3,811 ▲2,27619.56 ▼5.66895.76 ▲276.4446.28 ▼17.80
Media Library /wp-admin/upload.php1,429 ▲324.18 ▼0.0499.10 ▲0.1966.47 ▲25.74
Modules /wp-admin/admin.php?page=arm_feature_settings3,07921.88557.36137.92
Payment History /wp-admin/admin.php?page=arm_transactions2,23110.97633.1889.26
Content Access Rules /wp-admin/admin.php?page=arm_access_rules2,85925.80602.38112.22
Configure Plan + Signup Page /wp-admin/admin.php?page=arm_membership_setup3,01424.26567.3091.56
Documentation /wp-admin/admin.php?page=arm_documentation1,6791.3811.9966.95
Manage Members /wp-admin/admin.php?page=arm_manage_members2,22011.10608.2782.32
Manage Subscriptions /wp-admin/admin.php?page=arm_manage_subscriptions2,22011.04576.8168.61
Growth Plugins /wp-admin/admin.php?page=arm_growth_plugins1,8939.70552.52126.97
Upgrade to Pro /wp-admin/admin.php?page=arm_upgrade_to_premium5,4386.29171.21151.55
Manage Plans /wp-admin/admin.php?page=arm_manage_plans2,58221.45569.8165.03

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options detected upon uninstall: 7 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • armember_lite_install_date
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/armember-membership/core/views/arm_growth_plugins.php
    • > /wp-content/plugins/armember-membership/core/views/iframeupload.php
  • 74× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/armember-membership/core/views/arm_membership_setup_preview.php:6
    • > PHP Fatal error
      Uncaught Error: Call to a member function arm_get_all_global_settings() on null in wp-content/plugins/armember-membership/core/views/arm_manage_payment_gateways.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/armember-membership/core/views/arm_font_awesome.php:1657
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/armember-membership/core/classes/class.arm_payment_gateways.php:11
    • > PHP Fatal error
      Uncaught Error: Call to a member function arm_get_all_roles() on null in wp-content/plugins/armember-membership/core/views/arm_member_add.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/armember-membership/core/widgets/class.arm_widgetloginwidget.php:4
    • > PHP Fatal error
      Uncaught Error: Call to a member function arm_get_all_global_settings() on null in wp-content/plugins/armember-membership/core/views/arm_access_restriction_settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function arm_form_color_schemes() on null in wp-content/plugins/armember-membership/core/views/arm_form_editor.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function arm_get_all_member_templates() on null in wp-content/plugins/armember-membership/core/views/arm_profiles_directories.php:3
    • > PHP Warning
      array_map() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in wp-content/plugins/armember-membership/core/views/arm_membership_setup_add.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=arm_upgrade_to_premium
    • > Javascript (severe) in unknown
    https://www.armemberplugin.com/pricing/?utm_source=newsletter&utm_medium=email&utm_campaign=Armember_blackfriday_2023&utm_id=armember_1 3163 Access to script at 'https://embed.tawk.to/62be361b7b967b1179976ea1/1g6rg6nm5' from origin 'https://www.armemberplugin.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/admin.php?page=arm_upgrade_to_premium
    • > Network (severe)
    https://embed.tawk.to/62be361b7b967b1179976ea1/1g6rg6nm5 - Failed to load resource: net::ERR_FAILED

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: user profile, membership, content restriction, user registration, member

armember-membership/armember-membership.php 92% from 13 tests

"ARMember - Membership Plugin, Content Restriction, Member Levels, User Profile & User signup" version 4.0.18's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0" instead of "5.0")

Code Analysis 0% 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
These items require your attention
  • Even if your plugin relies on executable files (for example a companion app), never distribute executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/armember-membership/lib/data/ca-certificates.crt
89,171 lines of code in 150 files:
LanguageFilesBlank linesComment linesLines of code
PHP707,1004,73469,558
SVG1601013,729
PO File12,3267,2144,677
CSS31682892
Pascal1381,531283
JavaScript311032

PHP code 0% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,117)
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 451)
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity323.32
▷ Minimum class complexity8.00
▷ Maximum class complexity2,117.00
Average method complexity14.45
▷ Minimum method complexity1.00
▷ Maximum method complexity451.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes34
▷ Abstract classes00.00%
▷ Concrete classes34100.00%
▷ Final classes00.00%
Methods815
▷ Static methods111.35%
▷ Public methods815100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions33
▷ Named functions3296.97%
▷ Anonymous functions13.03%
Constants36
▷ Global constants2672.22%
▷ Class constants1027.78%
▷ Public constants10100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
315 PNG files occupy 0.58MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/textarea_icon.png0.19KB0.16KB▼ 17.09%
images/pay_par_post_icon.png1.51KB0.46KB▼ 69.66%
images/social_icons/vk_6.png0.38KB0.40KB0.00%
datatables/media/images/ui-bg_glass_75_e6e6e6_1x400.png0.10KB0.10KB0.00%
images/bootstrap_datepicker_hover.png0.36KB0.36KB0.00%