83% pmpro-import-members-from-csv

Code Review | Import Members from CSV for Paid Memberships Pro

WordPress plugin Import Members from CSV for Paid Memberships Pro scored83%from 54 tests.

About plugin

  • Plugin page: pmpro-import-memb...
  • Plugin version: 3.1.4
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Jan 3, 2018
  • Latest release: Jul 20, 2021
  • Number of updates: 58
  • Update frequency: every 22.3 days
  • Top authors: eighty20results (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /7,053 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
Installer ran successfully

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

An overview of server-side resources used by Import Members from CSV for Paid Memberships Pro
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.42 ▲0.9553.01 ▲9.40
Dashboard /wp-admin4.24 ▲0.8958.30 ▼5.43
Posts /wp-admin/edit.php4.29 ▲0.9357.56 ▲10.62
Add New Post /wp-admin/post-new.php6.82 ▲0.9399.17 ▼6.91
Media Library /wp-admin/upload.php4.16 ▲0.9350.99 ▲13.47
Import Members /wp-admin/admin.php?page=pmpro-import-members-from-csv4.0745.31

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

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

Browser metrics Passed 4 tests

Import Members from CSV for Paid Memberships Pro: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4314.38 ▲0.241.90 ▲0.1939.97 ▼4.53
Dashboard /wp-admin2,220 ▲405.68 ▲0.0885.42 ▼8.4240.20 ▲0.94
Posts /wp-admin/edit.php2,125 ▲282.16 ▲0.1338.86 ▲2.1235.29 ▲0.28
Add New Post /wp-admin/post-new.php1,551 ▲617.50 ▼5.73673.16 ▼10.3151.21 ▼6.46
Media Library /wp-admin/upload.php1,425 ▲254.25 ▼0.0699.00 ▼0.7544.73 ▲0.17
Import Members /wp-admin/admin.php?page=pmpro-import-members-from-csv1,1712.3830.9034.07

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
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
Please fix the following
  • 9× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'E20R\\Import_Members\\Validate\\Base_Validation' not found in wp-content/plugins/pmpro-import-members-from-csv/src/modules/PMPro/class-column-validation.php:29
    • > PHP Fatal error
      Uncaught Error: Class 'E20R\\Import_Members\\Validate\\Base_Validation' not found in wp-content/plugins/pmpro-import-members-from-csv/src/modules/Users/class-column-validation.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'E20R\\Import_Members\\Validate\\Base_Validation' not found in wp-content/plugins/pmpro-import-members-from-csv/src/modules/BuddyPress/class-column-validation.php:44
    • > PHP Fatal error
      Uncaught Error: Call to undefined function E20R\\Import_Members\\Modules\\PMPro\\add_action() in wp-content/plugins/pmpro-import-members-from-csv/src/modules/PMPro/class-import-sponsors.php:473
    • > PHP Fatal error
      Uncaught Error: Class 'E20R\\Import_Members\\Validate\\Base_Validation' not found in wp-content/plugins/pmpro-import-members-from-csv/src/validate/class-validate.php:28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/pmpro-import-members-from-csv/class.pmpro-import-members.php:60
    • > PHP Fatal error
      Uncaught Error: Class 'E20R\\Import_Members\\Validate\\Validate' not found in wp-content/plugins/pmpro-import-members-from-csv/src/modules/Users/class-user-validation.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function E20R\\Import_Members\\Modules\\BuddyPress\\add_action() in wp-content/plugins/pmpro-import-members-from-csv/src/modules/BuddyPress/class-buddypress.php:140
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/pmpro-import-members-from-csv/class-activateutilitiesplugin.php:213

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

pmpro-import-members-from-csv/class.pmpro-import-members.php 77% from 13 tests

"Import Members from CSV for Paid Memberships Pro" version 3.1.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("pmpro-import-members-from-csv.php" instead of "class.pmpro-import-members.php")
  • Domain Path: Use only dashes and lowercase characters for the domain path ("languages/")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages/")

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 plugin6,033 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
PHP301,3122,4444,667
Markdown419601,034
JavaScript16326241
YAML13157
CSS101721
HTML141913

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity24.10
▷ Minimum class complexity1.00
▷ Maximum class complexity113.00
Average method complexity5.51
▷ Minimum method complexity1.00
▷ Maximum method complexity50.00
Code structure
Namespaces8
Interfaces0
Traits0
Classes30
▷ Abstract classes26.67%
▷ Concrete classes2893.33%
▷ Final classes00.00%
Methods162
▷ Static methods3320.37%
▷ Public methods13482.72%
▷ Protected methods21.23%
▷ Private methods2616.05%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants16
▷ Global constants531.25%
▷ Class constants1168.75%
▷ Public constants11100.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 images were found in this plugin