84% pmpro-unlock

Code Review | Paid Memberships Pro - Unlock Protocol Integration

WordPress plugin Paid Memberships Pro - Unlock Protocol Integration scored84%from 54 tests.

About plugin

  • Plugin page: pmpro-unlock
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 8, 2022
  • Latest release: Apr 17, 2023
  • Number of updates: 8
  • Update frequency: every 20.0 days
  • Top authors: andrewza (87.5%)strangerstudios (25%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,258 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.61ms] Passed 4 tests

Analyzing server-side resources used by Paid Memberships Pro - Unlock Protocol Integration
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1332.26 ▼3.80
Dashboard /wp-admin3.43 ▲0.0845.60 ▼19.22
Posts /wp-admin/edit.php3.54 ▲0.1851.38 ▲7.88
Add New Post /wp-admin/post-new.php6.01 ▲0.1283.99 ▼6.81
Media Library /wp-admin/upload.php3.35 ▲0.1235.56 ▲3.40

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Paid Memberships Pro - Unlock Protocol Integration
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.34 ▼0.221.60 ▲0.0837.82 ▼4.50
Dashboard /wp-admin2,189 ▲125.54 ▼0.0084.19 ▼2.5741.20 ▲0.95
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0039.47 ▲3.9135.26 ▼3.17
Add New Post /wp-admin/post-new.php1,535 ▲918.06 ▼5.53635.43 ▼55.9655.00 ▼10.47
Media Library /wp-admin/upload.php1,403 ▲34.25 ▼0.0494.08 ▼4.1541.44 ▼5.79

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/pmpro-unlock/pmpro-unlock.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-unlock/includes/membership-level-settings.php:70
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-unlock/includes/checkout.php:38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/pmpro-unlock/includes/functions.php:328
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/pmpro-unlock/includes/admin.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-unlock/includes/profile.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-unlock/includes/login.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots need descriptions #1, #2, #3 in pmpro-unlock/assets to your readme.txt
Please take inspiration from this readme.txt

pmpro-unlock/pmpro-unlock.php Passed 13 tests

The primary PHP file in "Paid Memberships Pro - Unlock Protocol Integration" version 1.1.1 is used by WordPress to initiate all plugin functionality
52 characters long description:
Integrate Paid Memberships Pro with Unlock Protocol.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected696 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP8163269625
PO File1293371

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions34
▷ Named functions34100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin