78% memberspace

Code Review | MemberSpace - Membership Plugin and Paid Subscriptions

WordPress plugin MemberSpace - Membership Plugin and Paid Subscriptions scored78%from 54 tests.

About plugin

  • Plugin page: memberspace
  • Plugin version: 2.1.10
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.4
  • WordPress version: 6.3.1
  • First release: Apr 29, 2022
  • Latest release: Nov 6, 2023
  • Number of updates: 17
  • Update frequency: every 32.8 days
  • Top authors: memberspace (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

300+ active /6,471 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

An overview of server-side resources used by MemberSpace - Membership Plugin and Paid Subscriptions
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0940.69 ▲1.01
Dashboard /wp-admin3.47 ▲0.16256.64 ▲204.67
Posts /wp-admin/edit.php3.52 ▲0.16271.99 ▲225.79
Add New Post /wp-admin/post-new.php5.98 ▲0.10291.63 ▲196.56
Media Library /wp-admin/upload.php3.33 ▲0.10247.78 ▲214.09
MemberSpace /wp-admin/options-general.php?page=memberspace3.36227.57

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 28 new files
Database: no new tables, 8 new options
New WordPress options
db_upgraded
memberspace_display_banner
memberspace_extra_security
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for MemberSpace - Membership Plugin and Paid Subscriptions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲22116.80 ▲2.67167.17 ▲165.4757.87 ▲14.88
Dashboard /wp-admin2,202 ▲255.63 ▲0.0090.86 ▼0.5140.46 ▼7.16
Posts /wp-admin/edit.php2,107 ▲71.94 ▼0.0537.51 ▼2.5834.76 ▲2.32
Add New Post /wp-admin/post-new.php1,538 ▲1225.14 ▲1.86623.26 ▼45.6267.86 ▲13.49
Media Library /wp-admin/upload.php1,407 ▲74.24 ▲0.01106.98 ▼1.0243.63 ▲0.98
MemberSpace /wp-admin/options-general.php?page=memberspace9392.0124.2931.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/memberspace/public/extra-security-body.php
    • > /wp-content/plugins/memberspace/admin/partials/settings/rules/list.php
    • > /wp-content/plugins/memberspace/public/extra-security-head.php
    • > /wp-content/plugins/memberspace/admin/partials/notification-bar.php
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/memberspace/includes/memberspace.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/memberspace/admin/partials/settings/configuration.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/memberspace/admin/partials/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/memberspace/admin/partials/settings/account_create.php:1
    • > PHP Notice
      Undefined index: notification_type in wp-content/plugins/memberspace/admin/partials/notification-bar.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_js() in wp-content/plugins/memberspace/public/widget.js.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/memberspace/admin/partials/activation-banner.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/memberspace/admin/partials/settings/support.php:1
    • > PHP Notice
      Undefined index: notification in wp-content/plugins/memberspace/admin/partials/notification-bar.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/memberspace/admin/partials/settings/rules/list_row.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: membership, membership plugin, paid subscriptions, subscriptions, members

memberspace/memberspace.php 92% from 13 tests

The main file in "MemberSpace - Membership Plugin and Paid Subscriptions" v. 2.1.10 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,431 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
Markdown21860689
PHP22140120603
CSS2195113
JavaScript17626

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity8.67
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods34
▷ Static methods38.82%
▷ Public methods2676.47%
▷ Protected methods00.00%
▷ Private methods823.53%
Functions3
▷ Named functions133.33%
▷ Anonymous functions266.67%
Constants11
▷ Global constants327.27%
▷ Class constants872.73%
▷ Public constants8100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/ms-icon-round-white.png33.06KB12.57KB▼ 61.99%