94% members-only-shop-for-patreon-woocommerce

Code Review | Members-Only Shop for Patreon + WooCommerce

WordPress plugin Members-Only Shop for Patreon + WooCommerce scored 94% from 54 tests.

About plugin

  • Plugin page: members-only-shop...
  • Plugin version: 0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 5.8.1
  • First release: Oct 5, 2018
  • Latest release: Oct 6, 2018
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: killermann (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 692 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.01MB] [CPU: ▼141.39ms] Passed 4 tests

A check of server-side resources used by Members-Only Shop for Patreon + WooCommerce
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.92 ▲10.60
Dashboard /wp-admin3.07 ▲0.0255.93 ▲10.38
Posts /wp-admin/edit.php3.13 ▲0.0238.89 ▼5.20
Add New Post /wp-admin/post-new.php5.43 ▼0.0083.72 ▼569.37
Media Library /wp-admin/upload.php3.02 ▲0.0130.15 ▼1.35

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Members-Only Shop for Patreon + WooCommerce
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,723 ▲12815.99 ▲0.549.86 ▲0.2848.04 ▼2.50
Dashboard /wp-admin2,990 ▲565.93 ▼0.08140.43 ▲0.04110.02 ▼4.15
Posts /wp-admin/edit.php2,759 ▲202.68 ▼0.0075.37 ▲0.3085.36 ▼6.88
Add New Post /wp-admin/post-new.php1,513 ▲1518.55 ▼0.32370.39 ▲5.07115.00 ▼2.70
Media Library /wp-admin/upload.php1,827 ▲235.03 ▲0.02151.46 ▼9.99126.45 ▲10.46

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/members-only-shop-for-patreon-woocommerce/members-only-patreon-woocommerce.php:18

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: members-only, patreon, woocommerce

members-only-shop-for-patreon-woocommerce/members-only-patreon-woocommerce.php 92% from 13 tests

The main PHP script in "Members-Only Shop for Patreon + WooCommerce" version 0.2 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("members-only-shop-for-patreon-woocommerce.php" instead of "members-only-patreon-woocommerce.php")

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
Good job! No executable or dangerous file extensions detected201 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12740167
Markdown128034

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity24.00
▷ Minimum class complexity24.00
▷ Maximum class complexity24.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin