74% memberships-by-hubloy

Code Review | Memberships by Hubloy - Manage memberships and subscriptions

WordPress plugin Memberships by Hubloy - Manage memberships and subscriptions scored74%from 54 tests.

About plugin

  • Plugin page: memberships-by-hu...
  • Plugin version: 1.1.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-5.9.3
  • WordPress version: 6.3.1
  • First release: Apr 11, 2022
  • Latest release: May 7, 2022
  • Number of updates: 15
  • Update frequency: every 1.9 days
  • Top authors: hubloy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /350 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲3.10MB] [CPU: ▲19.87ms] Passed 4 tests

A check of server-side resources used by Memberships by Hubloy - Manage memberships and subscriptions
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /6.46 ▲3.0059.73 ▲15.73
Dashboard /wp-admin6.42 ▲3.1166.13 ▲16.73
Posts /wp-admin/edit.php6.53 ▲3.1771.14 ▲21.50
Add New Post /wp-admin/post-new.php9.18 ▲3.29115.61 ▲25.52
Media Library /wp-admin/upload.php6.34 ▲3.1158.34 ▲29.26

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 318 new files
Database: 10 new tables, 6 new options
New tables
wp_hubloy_m_invoice
wp_hubloy_m_activity
wp_hubloy_m_membership_rules
wp_hubloy_m_plans
wp_hubloy_m_meta
wp_hubloy_m_usage
wp_hubloy_m_membership
wp_hubloy_m_members
wp_hubloy_m_subscription_log
wp_hubloy_m_codes
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Memberships by Hubloy - Manage memberships and subscriptions
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,934 ▲14813.56 ▼1.0014.40 ▲12.3741.38 ▼4.96
Dashboard /wp-admin2,219 ▲395.56 ▼0.1187.44 ▼0.9839.62 ▼6.86
Posts /wp-admin/edit.php2,124 ▲242.02 ▲0.0240.07 ▼3.4935.88 ▲0.34
Add New Post /wp-admin/post-new.php1,545 ▲1723.43 ▲0.31647.92 ▲19.8759.09 ▲7.43
Media Library /wp-admin/upload.php1,424 ▲244.22 ▼0.0195.01 ▲1.0442.53 ▼3.55

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie tables detected upon uninstall: 10 tables
    • wp_hubloy_m_codes
    • wp_hubloy_m_usage
    • wp_hubloy_m_meta
    • wp_hubloy_m_activity
    • wp_hubloy_m_plans
    • wp_hubloy_m_invoice
    • wp_hubloy_m_members
    • wp_hubloy_m_subscription_log
    • wp_hubloy_m_membership_rules
    • wp_hubloy_m_membership
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 24× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'HubloyMembership\\Base\\Email' not found in wp-content/plugins/memberships-by-hubloy/app/emails/admin/signup.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/memberships-by-hubloy/app/ui/default/modal.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'HubloyMembership\\Base\\Email' not found in wp-content/plugins/memberships-by-hubloy/app/emails/member/account.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'HubloyMembership\\Base\\Email' not found in wp-content/plugins/memberships-by-hubloy/app/emails/member/membership/payment/failed.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'HubloyMembership\\Base\\Email' not found in wp-content/plugins/memberships-by-hubloy/app/emails/member/membership/status/after.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/memberships-by-hubloy/app/ui/default/link.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'HubloyMembership\\Base\\Email' not found in wp-content/plugins/memberships-by-hubloy/app/emails/member/membership/payment/due.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'HubloyMembership\\Base\\Email' not found in wp-content/plugins/memberships-by-hubloy/app/emails/member/membership/status/before.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/memberships-by-hubloy/app/ui/default/card.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'HubloyMembership\\Base\\Email' not found in wp-content/plugins/memberships-by-hubloy/app/emails/member/membership/status/finished.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

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
3 plugin tags: membership, subscriptions, members

memberships-by-hubloy/memberships-by-hubloy.php Passed 13 tests

Analyzing the main PHP file in "Memberships by Hubloy - Manage memberships and subscriptions" version 1.1.1
50 characters long description:
A complete membership and subscription experience.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin55,312 lines of code in 305 files:
LanguageFilesBlank linesComment linesLines of code
CSS131186,14120,537
JavaScript896,0651,29218,638
PHP2033,06112,20016,137

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity11.14
▷ Minimum class complexity1.00
▷ Maximum class complexity76.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces29
Interfaces0
Traits0
Classes130
▷ Abstract classes00.00%
▷ Concrete classes130100.00%
▷ Final classes10.77%
Methods1,014
▷ Static methods16816.57%
▷ Public methods91690.34%
▷ Protected methods363.55%
▷ Private methods626.11%
Functions44
▷ Named functions44100.00%
▷ Anonymous functions00.00%
Constants99
▷ Global constants2121.21%
▷ Class constants7878.79%
▷ Public constants78100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/gateways/paypal.png10.75KB13.28KB0.00%
assets/vendor/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
assets/vendor/jquery-ui/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%
assets/vendor/jquery-ui/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
assets/vendor/jquery-ui/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%