77% users-import-export-with-excel-for-wp

Code Review | Users Import Export with Excel for WordPress

WordPress plugin Users Import Export with Excel for WordPress scored 77% from 54 tests.

About plugin

  • Plugin page: users-import-expo...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.2-6.2
  • WordPress version: 6.3.1
  • First release: Aug 14, 2019
  • Latest release: Jul 13, 2023
  • Number of updates: 22
  • Update frequency: every 65.1 days
  • Top authors: taz_bambu (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active / 4,280 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.66ms] Passed 4 tests

Analyzing server-side resources used by Users Import Export with Excel for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.94 ▼8.49
Dashboard /wp-admin3.31 ▲0.0047.34 ▼1.88
Posts /wp-admin/edit.php3.36 ▲0.0045.14 ▼3.88
Add New Post /wp-admin/post-new.php5.89 ▲0.0082.50 ▼8.38
Media Library /wp-admin/upload.php3.23 ▲0.0033.36 ▲0.26
Users Import / Export /wp-admin/users.php?page=imue3.0022.39

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 157 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Users Import Export with Excel for WordPress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /1,441 ▼1,29412.30 ▼1.942.05 ▲0.0642.31 ▼6.46
Dashboard /wp-admin2,197 ▲95.83 ▲0.74116.51 ▲0.3362.31 ▲13.50
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0636.99 ▲1.3532.21 ▼0.61
Add New Post /wp-admin/post-new.php1,534 ▲623.22 ▲4.92643.56 ▼13.6033.14 ▼24.93
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.0693.83 ▼5.9839.84 ▼5.04
Users Import / Export /wp-admin/users.php?page=imue280.440.084.04

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 57× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/users-import-export-with-excel-for-wp/Classes/PHPExcel/Writer/Excel2007/Chart.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel2007_WriterPart' not found in wp-content/plugins/users-import-export-with-excel-for-wp/Classes/PHPExcel/Writer/Excel2007/DocProps.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/users-import-export-with-excel-for-wp/Classes/PHPExcel/CachedObjectStorage/Wincache.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Worksheet_Drawing' not found in wp-content/plugins/users-import-export-with-excel-for-wp/Classes/PHPExcel/Worksheet/HeaderFooterDrawing.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/users-import-export-with-excel-for-wp/Classes/PHPExcel/CachedObjectStorage/DiscISAM.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Writer_Excel5_BIFFwriter' not found in wp-content/plugins/users-import-export-with-excel-for-wp/Classes/PHPExcel/Writer/Excel5/Worksheet.php:71
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_CachedObjectStorage_CacheBase' not found in wp-content/plugins/users-import-export-with-excel-for-wp/Classes/PHPExcel/CachedObjectStorage/Igbinary.php:36
    • > PHP Fatal error
      Uncaught Error: Class 'PHPExcel_Shared_File' not found in wp-content/plugins/users-import-export-with-excel-for-wp/Classes/PHPExcel/Shared/ZipArchive.php:29
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPExcel_IComparable' not found in wp-content/plugins/users-import-export-with-excel-for-wp/Classes/PHPExcel/Worksheet/BaseDrawing.php:36
    • > PHP Fatal error
      Uncaught Error: Interface 'PHPExcel_IComparable' not found in wp-content/plugins/users-import-export-with-excel-for-wp/Classes/PHPExcel/Style/Conditional.php:36

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/users.php?page=imue
    • > Network (severe)
    wp-admin/users.php?page=imue - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: A description for screenshot #3 is missing in users-import-export-with-excel-for-wp/assets to your readme.txt
  • Screenshots: Add an image for screenshot #4 (Users Import Export with Excel for WordPress Export screen)
The official readme.txt might help

users-import-export-with-excel-for-wp/users-customers-import-export-excel-wp.php 77% from 13 tests

"Users Import Export with Excel for WordPress" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("users-import-export-with-excel-for-wp.php" instead of "users-customers-import-export-excel-wp.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Requires at least: Required version must match the one declared in readme.txt ("3.0.1" instead of "2.2")

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected42,134 lines of code in 142 files:
LanguageFilesBlank linesComment linesLines of code
PHP1349,36528,25140,720
SVG100685
CSS27538367
JavaScript45517234
PO File15160128

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
The following items need your attention
  • Class cyclomatic complexity has to be reduced to less than 1000 (currently 1,148)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 373)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity59.63
▷ Minimum class complexity1.00
▷ Maximum class complexity1,148.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity373.00
Code structure
Namespaces0
Interfaces7
Traits0
Classes127
▷ Abstract classes32.36%
▷ Concrete classes12497.64%
▷ Final classes00.00%
Methods2,230
▷ Static methods54424.39%
▷ Public methods1,81681.43%
▷ Protected methods30.13%
▷ Private methods41118.43%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants553
▷ Global constants417.41%
▷ Class constants51292.59%
▷ Public constants512100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/extendwp.png5.75KB3.37KB▼ 41.46%
images/default.png14.13KB5.96KB▼ 57.80%
images/users-customers-import-export-excel-wp-woocommerce-pro.png33.35KB15.03KB▼ 54.92%