84% wp-simple-membership

Code Review | Wp simple Membership

WordPress plugin Wp simple Membership scored84%from 54 tests.

About plugin

  • Plugin page: wp-simple-membership
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Mar 1, 2016
  • Latest release: Mar 7, 2016
  • Number of updates: 16
  • Update frequency: every 0.4 days
  • Top authors: janothemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,971 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by Wp simple Membership
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1238.15 ▼0.17
Dashboard /wp-admin3.42 ▲0.1143.86 ▼4.81
Posts /wp-admin/edit.php3.53 ▲0.1747.56 ▼3.75
Add New Post /wp-admin/post-new.php6.00 ▲0.1181.23 ▼21.07
Media Library /wp-admin/upload.php3.34 ▲0.1138.24 ▲7.00
Membership Settings /wp-admin/options-general.php?page=bc-settings3.3229.43

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
bc_settings
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wp simple Membership
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.26 ▼1.031.81 ▼0.0037.82 ▼1.23
Dashboard /wp-admin2,210 ▲224.85 ▼1.02112.46 ▲5.3943.02 ▲0.81
Posts /wp-admin/edit.php2,093 ▲42.02 ▼0.0438.31 ▼3.0834.74 ▼3.27
Add New Post /wp-admin/post-new.php1,517 ▼1617.69 ▼5.52664.38 ▲28.7951.71 ▼11.12
Media Library /wp-admin/upload.php1,395 ▲134.21 ▲0.0298.02 ▼1.7440.55 ▼4.56
Membership Settings /wp-admin/options-general.php?page=bc-settings8812.0328.7428.42

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • bc_settings

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-simple-membership/inc/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-simple-membership/templates/login-form.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-simple-membership/templates/register-form.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-simple-membership/plugin.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-simple-membership/templates/profile-form.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function do_action() in wp-content/plugins/wp-simple-membership/templates/lost-password.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
Please take inspiration from this readme.txt

wp-simple-membership/plugin.php 92% from 13 tests

The principal PHP file in "Wp simple Membership" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-simple-membership.php" instead of "plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin659 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP821417647
CSS10012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity48.00
▷ Minimum class complexity48.00
▷ Maximum class complexity48.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions1090.91%
▷ Anonymous functions19.09%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin