67% paid-membership

Code Review | MicroPayments - Paid Author Subscriptions, Digital Assets, Downloads, Membership

WordPress plugin MicroPayments - Paid Author Subscriptions, Digital Assets, Downloads, Membership scored67%from 54 tests.

About plugin

  • Plugin page: paid-membership
  • Plugin version: 2.9.6
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 22, 2016
  • Latest release: Nov 16, 2023
  • Number of updates: 193
  • Update frequency: every 13.6 days
  • Top authors: videowhisper (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

60+ active /24,214 total downloads


Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.06MB] [CPU: ▼10.25ms] Passed 4 tests

An overview of server-side resources used by MicroPayments - Paid Author Subscriptions, Digital Assets, Downloads, Membership
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1739.77 ▼0.68
Dashboard /wp-admin3.46 ▲0.1545.03 ▼5.87
Posts /wp-admin/edit.php3.51 ▲0.1548.20 ▼1.15
Add New Post /wp-admin/post-new.php5.27 ▼0.6261.30 ▼32.17
Media Library /wp-admin/upload.php3.32 ▲0.0934.93 ▼1.82
Documentation /wp-admin/admin.php?page=paid-membership-doc3.2630.25
Transactions /wp-admin/admin.php?page=micropayments-transactions3.2935.24
Settings /wp-admin/admin.php?page=paid-membership3.3645.94

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 54 new files
Database: 1 new table, 8 new options
New tables
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by MicroPayments - Paid Author Subscriptions, Digital Assets, Downloads, Membership
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,938 ▲17614.11 ▼0.251.90 ▲0.2343.57 ▼0.88
Dashboard /wp-admin2,287 ▲1105.61 ▲0.0991.94 ▼11.9444.98 ▼0.71
Posts /wp-admin/edit.php2,189 ▲861.95 ▲0.0138.00 ▼2.6636.58 ▲0.81
Add New Post /wp-admin/post-new.php1,604 ▲7823.42 ▲0.34692.48 ▼12.8567.07 ▲10.84
Media Library /wp-admin/upload.php1,486 ▲864.28 ▲0.12103.67 ▼3.6847.22 ▲2.08
Documentation /wp-admin/admin.php?page=paid-membership-doc9882.0123.8132.76
Transactions /wp-admin/admin.php?page=micropayments-transactions1,0842.0224.3136.03
Settings /wp-admin/admin.php?page=paid-membership1,1332.1623.4433.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_vw_micropay_transactions
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • VWpaidMembershipOptions
    • vw_micropayments_db

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?page=paid-membership-doc
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method VWpaidMembership::adminDocs() should not be called statically

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/paid-membership/taxonomy-collection.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/paid-membership/template-download.php:6

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)
No browser errors were detected


Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
  • Screenshots: These screenshots require images: #1 (Wallets: MyCred, TeraWallet (WooCommerce)), #2 (Setup paid content (post/page) as WooCommerce product.), #3 (WooCommerce product for paid content.), #4 (Control access to content by membership/role.), #5 (Users can purchase membership with credits.), #6 (Edit, Wallet, Donate to Author for selected content types.), #7 (Donate to Author dialog: select amount.), #8 (Setup donation goals, crowdfunding), #9 (Donation goal, crowdfunding on content page), #10 (Digital asset management), #11 (Upload content with Plupload)
You can look at the official readme.txt

paid-membership/paid-membership.php 85% from 13 tests

"MicroPayments - Paid Author Subscriptions, Digital Assets, Downloads, Membership" version 2.9.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Plugin Name: Keep the plugin name shorter than 70 characters (currently 80 characters long)
  • Description: Please don't use more than 140 characters for the plugin description (currently 1345 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected13,614 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PO File1297324804

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 188)
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity303.40
▷ Minimum class complexity8.00
▷ Maximum class complexity735.00
Average method complexity10.88
▷ Minimum method complexity1.00
▷ Maximum method complexity188.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
▷ Static methods13286.27%
▷ Public methods153100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
20 PNG files occupy 0.81MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-11.png67.04KB21.61KB▼ 67.77%
screenshot-6.png52.79KB16.21KB▼ 69.30%
interface/jquery.ui.plupload/img/plupload.png6.44KB2.99KB▼ 53.58%
screenshot-5.png44.42KB19.17KB▼ 56.83%
interface/jquery.ui/images/ui-icons_777620_256x240.png4.57KB4.18KB▼ 8.43%