68% quickr-membership

Code Review | QuickR Membership

WordPress plugin QuickR Membership scored 68% from 54 tests.

About plugin

  • Plugin page: quickr-membership
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.5
  • WordPress version: 5.8.1
  • First release: Sep 22, 2016
  • Latest release: Sep 30, 2016
  • Number of updates: 9
  • Update frequency: every 1.2 days
  • Top authors: amijanina (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 640 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.74MB] [CPU: ▼357.20ms] Passed 4 tests

An overview of server-side resources used by QuickR Membership
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.33 ▲0.5039.89 ▲8.75
Dashboard /wp-admin3.92 ▲0.8746.96 ▲4.32
Posts /wp-admin/edit.php3.97 ▲0.8737.52 ▼6.87
Add New Post /wp-admin/post-new.php6.23 ▲0.8098.86 ▼1,424.84
Media Library /wp-admin/upload.php3.80 ▲0.8039.36 ▼1.40
Extensions /wp-admin/admin.php?page=quickr_extensions3.7838.00
Payments /wp-admin/admin.php?page=quickr_payments3.8140.09
Membership Level /wp-admin/admin.php?page=quickr_membership_level3.8236.57
Logs /wp-admin/edit.php?post_type=quickr_log3.9139.87
Tags /wp-admin/edit-tags.php?taxonomy=quickr_log_type&post_type=quickr_log3.8143.68
Member /wp-admin/admin.php?page=quickr_member3.8243.17
Quickr Member /wp-admin/admin.php?page=quickr_membership3.7939.49
Settings /wp-admin/admin.php?page=quickr_settings3.7933.99

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 242 new files
Database: 3 new tables, 1 new option
New tables
wp_quickr_membership_post_rels
wp_quickr_member_membership_rels
wp_quickr_transactions
New WordPress options
quickr-settings

Browser metrics Passed 4 tests

QuickR Membership: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,823 ▲22715.91 ▲0.227.18 ▼3.2549.71 ▲1.12
Dashboard /wp-admin3,110 ▲1766.21 ▲0.28128.29 ▼17.61111.39 ▼8.76
Posts /wp-admin/edit.php2,878 ▲1392.72 ▲0.0372.43 ▲2.2892.15 ▼2.51
Add New Post /wp-admin/post-new.php1,628 ▼4818.34 ▼0.49342.29 ▼26.11111.70 ▲6.32
Media Library /wp-admin/upload.php1,944 ▲1345.13 ▲0.13153.73 ▲7.92114.94 ▼6.83
Extensions /wp-admin/admin.php?page=quickr_extensions1,2172.4959.8691.25
Payments /wp-admin/admin.php?page=quickr_payments1,4482.5063.3283.90
Membership Level /wp-admin/admin.php?page=quickr_membership_level1,4102.4364.3974.19
Logs /wp-admin/edit.php?post_type=quickr_log1,5302.6667.1878.27
Tags /wp-admin/edit-tags.php?taxonomy=quickr_log_type&post_type=quickr_log2,1472.6662.5598.03
Member /wp-admin/admin.php?page=quickr_member1,4452.5561.7489.67
Quickr Member /wp-admin/admin.php?page=quickr_membership1,3022.3760.8470.66
Settings /wp-admin/admin.php?page=quickr_settings1,3882.4962.8192.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • The plugin did not uninstall successfully, leaving 3 tables in the database
    • wp_quickr_membership_post_rels
    • wp_quickr_transactions
    • wp_quickr_member_membership_rels
  • Zombie WordPress options detected upon uninstall: 1 option
    • quickr-settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 18× PHP files output non-empty strings when accessed directly via GET requests (only 10 are shown):
    • > /wp-content/plugins/quickr-membership/trunk/views/admin/extensions/tab.php
    • > /wp-content/plugins/quickr-membership/views/admin/settings/tab.php
    • > /wp-content/plugins/quickr-membership/trunk/views/admin/settings/tab.php
    • > /wp-content/plugins/quickr-membership/trunk/views/admin/dashboard/pagelet/at_a_glance.php
    • > /wp-content/plugins/quickr-membership/views/front/profile.php
    • > /wp-content/plugins/quickr-membership/views/front/comment_replacement.php
    • > /wp-content/plugins/quickr-membership/views/admin/members/tab.php
    • > /wp-content/plugins/quickr-membership/views/admin/extensions/tab.php
    • > /wp-content/plugins/quickr-membership/views/admin/memberships/tab.php
    • > /wp-content/plugins/quickr-membership/views/admin/payments/tab.php
  • 188× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Quickr_I18n' not found in wp-content/plugins/quickr-membership/views/admin/payments/payment_details.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Quickr_I18n' not found in wp-content/plugins/quickr-membership/trunk/views/admin/payments/paypal_subscription_button.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/quickr-membership/trunk/views/admin/settings/template.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/quickr-membership/views/admin/dashboard/container.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/quickr-membership/trunk/views/admin/dashboard/container.php:5
    • > PHP Warning
      Use of undefined constant QUICKR_CLASSES - assumed 'QUICKR_CLASSES' (this will throw an Error in a future version of PHP) in wp-content/plugins/quickr-membership/trunk/classes/admin/settings-tab/class-quickr-payment-settings-tab.php on line 8
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/quickr-membership/views/admin/memberships/tab.php on line 2
    • > PHP Notice
      Undefined variable: return in wp-content/plugins/quickr-membership/trunk/views/front/paypal_subscription_button.php on line 44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/quickr-membership/views/front/paypal_subscription_button.php:48
    • > PHP Notice
      Undefined variable: tabs in wp-content/plugins/quickr-membership/views/admin/extensions/tab.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (22 tag instead of maximum 10)
Please take inspiration from this readme.txt

quickr-membership/quickr-membership.php Passed 13 tests

The main PHP script in "QuickR Membership" version 1.0.0 is automatically included on every request by WordPress
41 characters long description:
An Extensible wordpress membership plugin

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected6,171 lines of code in 110 files:
LanguageFilesBlank linesComment linesLines of code
PHP1057221,7065,753
PO File2164243375
CSS32843

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity7.61
▷ Minimum class complexity1.00
▷ Maximum class complexity42.00
Average method complexity1.98
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes134
▷ Abstract classes42.99%
▷ Concrete classes13097.01%
▷ Final classes00.00%
Methods918
▷ Static methods14215.47%
▷ Public methods75682.35%
▷ Protected methods20.22%
▷ Private methods16017.43%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants98
▷ Global constants1010.20%
▷ Class constants8889.80%
▷ Public constants88100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/images/success.png4.34KB1.51KB▼ 65.32%
images/warning.png4.46KB1.51KB▼ 66.10%
images/success.png4.34KB1.51KB▼ 65.32%
images/error.png4.24KB1.48KB▼ 65.18%
trunk/images/warning.png4.46KB1.51KB▼ 66.10%