84% import-users-from-csv

Code Review | Import Users from CSV

WordPress plugin Import Users from CSV scored 84% from 54 tests.

About plugin

  • Plugin page: import-users-from...
  • Plugin version: 1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: May 23, 2011
  • Latest release: Aug 31, 2023
  • Number of updates: 40
  • Update frequency: every 112.1 days
  • Top authors: sorich87 (62.5%)andrewza (40%)

Code review

54 tests

User reviews

41 reviews

Install metrics

20,000+ active / 199,181 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.13ms] Passed 4 tests

A check of server-side resources used by Import Users from CSV
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.57 ▼0.68
Dashboard /wp-admin3.31 ▲0.0147.32 ▼0.73
Posts /wp-admin/edit.php3.36 ▲0.0143.80 ▼4.09
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.30 ▼11.01
Media Library /wp-admin/upload.php3.24 ▲0.0133.46 ▲1.32
Import From CSV /wp-admin/users.php?page=import-users-from-csv3.2030.46

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Import Users from CSV
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.34 ▼1.042.00 ▲0.2042.70 ▼1.39
Dashboard /wp-admin2,210 ▲225.86 ▲0.98111.34 ▼6.8144.98 ▼1.56
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0134.15 ▼2.1937.52 ▲1.33
Add New Post /wp-admin/post-new.php1,517 ▼1717.41 ▼5.67686.99 ▲23.5457.69 ▲7.95
Media Library /wp-admin/upload.php1,392 ▲14.23 ▲0.0594.57 ▼11.7543.41 ▼0.28
Import From CSV /wp-admin/users.php?page=import-users-from-csv8452.1824.0028.80

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/import-users-from-csv/import-users-from-csv.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'WP_CLI' not found in wp-content/plugins/import-users-from-csv/includes/import-users-from-csv.wpcli.php:3

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 (User import screen) image not found
You can look at the official readme.txt

import-users-from-csv/import-users-from-csv.php Passed 13 tests

The main PHP script in "Import Users from CSV" version 1.1 is automatically included on every request by WordPress
47 characters long description:
Import Users data and metadata from a csv file.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin579 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP396166431
PO File25896148

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity36.50
▷ Minimum class complexity23.00
▷ Maximum class complexity50.00
Average method complexity8.10
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods10
▷ Static methods770.00%
▷ Public methods770.00%
▷ Protected methods00.00%
▷ Private methods330.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants7
▷ Global constants114.29%
▷ Class constants685.71%
▷ Public constants6100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.04MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png45.96KB17.63KB▼ 61.64%