10% rs-members

Code Review | RS-Members

WordPress plugin RS-Members scored10%from 54 tests.

About plugin

  • Plugin page: rs-members
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.4.1
  • WordPress version: 6.3.1
  • First release: Jul 10, 2015
  • Latest release: Mar 3, 2016
  • Number of updates: 33
  • Update frequency: every 7.2 days
  • Top authors: themexpo (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

10+ active /6,430 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • Install procedure had errors
    • > Notice in wp-content/plugins/rs-members/rsmembers.php+160
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.33MB] [CPU: ▼15.61ms] Passed 4 tests

Server-side resources used by RS-Members
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.01 ▲0.5540.44 ▼1.95
Dashboard /wp-admin4.05 ▲0.7457.88 ▲1.59
Posts /wp-admin/edit.php4.10 ▲0.7462.74 ▲6.84
Add New Post /wp-admin/post-new.php5.25 ▼0.6452.44 ▼60.11
Media Library /wp-admin/upload.php3.88 ▲0.6538.80 ▼1.97

Server storage [IO: ▲1.10MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 57 new files
Database: no new tables, 68 new options
New WordPress options
rs_restore_default_settings
rs_show_login_messages
rs_windowslive_api_id
rs_reddit_api_secret
rs_linkedin_api_secret
rs_login_redirect_url
rs_instagram_api_secret
widget_theysaidso_widget
rs_logout_inactive_users
rs_github_api_id
...

Browser metrics Passed 4 tests

Checking browser requirements for RS-Members
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,114 ▲35315.43 ▲0.987.65 ▲5.7240.45 ▼3.86
Dashboard /wp-admin2,379 ▲1996.53 ▲0.81122.02 ▲31.2636.57 ▼4.13
Posts /wp-admin/edit.php2,310 ▲2103.72 ▲1.7156.05 ▲20.3134.11 ▼0.56
Add New Post /wp-admin/post-new.php1,724 ▲17021.41 ▲3.13652.71 ▼24.4349.35 ▼4.66
Media Library /wp-admin/upload.php1,448 ▲514.51 ▲0.2585.24 ▼28.5546.78 ▼2.63

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 68 options
    • rs_suppress_welcome_email
    • rs_facebook_api_enabled
    • widget_rsmemberssignup
    • rs_login_redirect_page
    • widget_recent-posts
    • rs_linkedin_api_secret
    • rs_instagram_api_id
    • rs_logout_redirect
    • rs_reddit_api_enabled
    • rs_instagram_api_secret
    • ...

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 11× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rs-members/login-instagram.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rs-members/login-google.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rs-members/login-paypal.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rs-members/login-twitter.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rs-members/login-reddit.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rs-members/include/rsmembers-widget-login.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rs-members/login-facebook.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rs-members/register.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/rs-members/login-linkedin.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/rs-members/include/rsmembers-widget-signup.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Tags: Please delete some tags, you are using 19 tag instead of maximum 10
Please take inspiration from this readme.txt

rs-members/rsmembers.php 92% from 13 tests

The main file in "RS-Members" v. 1.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("rs-members.php" instead of "rsmembers.php")

Code Analysis 97% from 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
No dangerous file extensions were detected8,769 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP191,0519315,505
JavaScript82623201,915
CSS813991829
SVG100520

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 121)
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity58.89
▷ Minimum class complexity1.00
▷ Maximum class complexity199.00
Average method complexity4.72
▷ Minimum method complexity1.00
▷ Maximum method complexity121.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods140
▷ Static methods85.71%
▷ Public methods12488.57%
▷ Protected methods00.00%
▷ Private methods1611.43%
Functions47
▷ Named functions47100.00%
▷ Anonymous functions00.00%
Constants79
▷ Global constants7594.94%
▷ Class constants45.06%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
13 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
include/icons/google.png3.93KB0.67KB▼ 82.92%
include/icons/instagram.png3.86KB0.86KB▼ 77.60%
assets/css/images/corners.png0.38KB0.33KB▼ 12.92%
assets/js/C_restric.png0.44KB0.48KB0.00%
assets/css/images/sides.png0.13KB0.09KB▼ 28.68%