84% simple-membership-after-login-redirection

Code Review | Simple Membership After Login Redirection

WordPress plugin Simple Membership After Login Redirection scored84%from 54 tests.

About plugin

  • Plugin page: simple-membership...
  • Plugin version: v1.6...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.3
  • WordPress version: 6.3.1
  • First release: Jun 17, 2014
  • Latest release: Jul 27, 2023
  • Number of updates: 29
  • Update frequency: every 114.7 days
  • Top authors: wp.insider (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

20,000+ active /134,666 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼7.15ms] Passed 4 tests

This is a short check of server-side resources used by Simple Membership After Login Redirection
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0236.89 ▼3.02
Dashboard /wp-admin3.32 ▲0.0239.90 ▼7.47
Posts /wp-admin/edit.php3.38 ▲0.0245.70 ▼3.69
Add New Post /wp-admin/post-new.php5.91 ▲0.0282.75 ▼14.42
Media Library /wp-admin/upload.php3.25 ▲0.0235.86 ▲1.92

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Simple Membership After Login Redirection: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.261.64 ▼0.0439.23 ▲1.15
Dashboard /wp-admin2,206 ▲185.85 ▼0.05111.03 ▼1.5743.84 ▲1.29
Posts /wp-admin/edit.php2,089 ▼01.99 ▲0.0240.04 ▼2.3235.46 ▼0.30
Add New Post /wp-admin/post-new.php1,542 ▲618.10 ▼5.06613.05 ▼46.2051.65 ▼1.62
Media Library /wp-admin/upload.php1,382 ▼94.28 ▼0.03100.68 ▲4.9941.30 ▼1.44

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-membership-after-login-redirection/swpm-after-login-settings-menu.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: login, membership, members, level, access...

simple-membership-after-login-redirection/swpm-after-login-redirection.php 85% from 13 tests

The main PHP script in "Simple Membership After Login Redirection" version v1.6... is automatically included on every request by WordPress
The following require your attention:
  • Version: The version number should only use digits and periods (ex. "1.0.3" instead of "v1.6...")
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-membership-after-login-redirection.php" instead of "swpm-after-login-redirection.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin205 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24740205

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected