84% simple-membership-wp-user-import

Code Review | Simple Membership WP user Import

WordPress plugin Simple Membership WP user Import scored84%from 54 tests.

About plugin

  • Plugin page: simple-membership...
  • Plugin version: 1.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 1, 2014
  • Latest release: Oct 21, 2023
  • Number of updates: 24
  • Update frequency: every 139.2 days
  • Top authors: wp.insider (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

5,000+ active /44,785 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.04MB] [CPU: ▼9.20ms] Passed 4 tests

This is a short check of server-side resources used by Simple Membership WP user Import
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0535.69 ▼5.07
Dashboard /wp-admin3.36 ▲0.0148.65 ▼17.72
Posts /wp-admin/edit.php3.47 ▲0.1146.47 ▲3.11
Add New Post /wp-admin/post-new.php5.94 ▲0.0590.77 ▼14.43
Media Library /wp-admin/upload.php3.28 ▲0.0535.25 ▲0.41

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Simple Membership WP user Import
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲1814.28 ▼0.081.54 ▼0.4739.94 ▼3.71
Dashboard /wp-admin2,189 ▲125.57 ▼0.0592.58 ▼6.1242.51 ▲1.33
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0139.31 ▲1.6035.74 ▼3.29
Add New Post /wp-admin/post-new.php1,526 ▼623.16 ▲0.08585.14 ▼62.8058.36 ▲1.38
Media Library /wp-admin/upload.php1,403 ▼04.22 ▼0.0095.29 ▲0.3644.04 ▲3.17

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon 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 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
The following issues need your attention
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-membership-wp-user-import/classes/class.swpm_wp_user_list.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/simple-membership-wp-user-import/classes/class.swpm_wp_user_list.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/simple-membership-wp-user-import/classes/class.swpm_wp_user_list.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'BUtils' not found in wp-content/plugins/simple-membership-wp-user-import/views/wp_user_list.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/simple-membership-wp-user-import/swpm-wp-import.php:15
    • > PHP Warning
      Use of undefined constant SWPM_WP_IMPORT_VERSION - assumed 'SWPM_WP_IMPORT_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-membership-wp-user-import/views/wp_user_list.php on line 1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
9 plugin tags: membership, import, export, users, member...

simple-membership-wp-user-import/swpm-wp-import.php 92% from 13 tests

The primary PHP file in "Simple Membership WP user Import" version 1.9.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("simple-membership-wp-user-import.php" instead of "swpm-wp-import.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
There were no executable files found in this plugin305 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP42427305

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity16.50
▷ Minimum class complexity16.00
▷ Maximum class complexity17.00
Average method complexity2.82
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods1376.47%
▷ Protected methods00.00%
▷ Private methods423.53%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin