89% sprucejoy-membership

Code Review | SpruceJoy Membership - Content Restriction, Ad-Free, Paid & Free Member Subscriptions

WordPress plugin SpruceJoy Membership - Content Restriction, Ad-Free, Paid & Free Member Subscriptions scored89%from 54 tests.

About plugin

  • Plugin page: sprucejoy-membership
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 6.3.1
  • First release: Apr 23, 2021
  • Latest release: Apr 23, 2021
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: sprucejoy (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /409 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

This is a short check of server-side resources used by SpruceJoy Membership - Content Restriction, Ad-Free, Paid & Free Member Subscriptions
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.02 ▼2.39
Dashboard /wp-admin3.35 ▲0.0547.30 ▼2.23
Posts /wp-admin/edit.php3.47 ▲0.1149.06 ▲4.71
Add New Post /wp-admin/post-new.php5.94 ▲0.0594.77 ▲2.13
Media Library /wp-admin/upload.php3.28 ▲0.0541.39 ▲2.63
SpruceJoy Membership /wp-admin/options-general.php?page=wpsjmembership-settings3.2530.96

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
wpsjmembership_site_id
widget_recent-posts
widget_recent-comments
wpsjmembership_settings
theysaidso_admin_options
db_upgraded
wpsjmembership_integration_state

Browser metrics Passed 4 tests

Checking browser requirements for SpruceJoy Membership - Content Restriction, Ad-Free, Paid & Free Member Subscriptions
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲5213.18 ▼1.401.66 ▼1.1240.98 ▼7.79
Dashboard /wp-admin2,209 ▲215.84 ▲0.7897.05 ▼8.8944.52 ▲2.75
Posts /wp-admin/edit.php2,098 ▲91.99 ▼0.0639.84 ▲2.6334.25 ▼3.69
Add New Post /wp-admin/post-new.php1,533 ▲1922.93 ▲5.29674.31 ▼67.3850.44 ▼7.87
Media Library /wp-admin/upload.php1,394 ▲64.25 ▲0.11108.14 ▼8.1746.94 ▲2.01
SpruceJoy Membership /wp-admin/options-general.php?page=wpsjmembership-settings9151.9529.2144.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 ([TO BE ADD]) image required
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
You can take inspiration from this readme.txt

sprucejoy-membership/wp-sprucejoy-membership.php 77% from 13 tests

The primary PHP file in "SpruceJoy Membership - Content Restriction, Ad-Free, Paid & Free Member Subscriptions" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("sprucejoy-membership.php" instead of "wp-sprucejoy-membership.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 145 characters long)

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
Everything looks great! No dangerous files found in this plugin592 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12139427376
CSS11215119
Markdown143060
JavaScript10037

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity5.25
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods16
▷ Static methods318.75%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected