84% csv-mass-importer

Code Review | CSV Mass Importer

WordPress plugin CSV Mass Importer scored84%from 54 tests.

About plugin

  • Plugin page: csv-mass-importer
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.5.2
  • WordPress version: 6.3.1
  • First release: May 22, 2016
  • Latest release: May 22, 2016
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: aleapp (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /3,368 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.03MB] [CPU: ▼5.32ms] Passed 4 tests

This is a short check of server-side resources used by CSV Mass Importer
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.15 ▼8.93
Dashboard /wp-admin3.33 ▲0.0349.59 ▼2.90
Posts /wp-admin/edit.php3.44 ▲0.0948.18 ▼7.18
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.05 ▼2.26
Media Library /wp-admin/upload.php3.25 ▲0.0239.15 ▲3.98
CSV Mass Importer /wp-admin/tools.php?page=cmi-tool3.2232.59

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

CSV Mass Importer: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.38 ▼0.181.88 ▼0.0739.13 ▼7.76
Dashboard /wp-admin2,199 ▲255.66 ▼0.0488.55 ▼0.0339.30 ▼0.91
Posts /wp-admin/edit.php2,101 ▲12.00 ▲0.0336.05 ▼2.2131.82 ▼5.02
Add New Post /wp-admin/post-new.php1,558 ▲1318.37 ▼4.69644.43 ▲1.5455.92 ▲2.45
Media Library /wp-admin/upload.php1,407 ▲74.25 ▲0.0299.57 ▼7.3240.65 ▼4.62
CSV Mass Importer /wp-admin/tools.php?page=cmi-tool1,1341.9927.8535.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'CMI_Helper' not found in wp-content/plugins/csv-mass-importer/helpers-html.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CMI_Action' not found in wp-content/plugins/csv-mass-importer/admin.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'CMI_Helper_Html' not found in wp-content/plugins/csv-mass-importer/admin-actions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/csv-mass-importer/csv-mass-importer.php:10

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
8 plugin tags: update, wpml compatible, multilingual, excel, csv...

csv-mass-importer/csv-mass-importer.php Passed 13 tests

The primary PHP file in "CSV Mass Importer" version 1.2 is used by WordPress to initiate all plugin functionality
44 characters long description:
Imports and updates post data from CSV file.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin1,256 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP5170281,136
JavaScript187107
CSS431113

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity70.25
▷ Minimum class complexity14.00
▷ Maximum class complexity130.00
Average method complexity5.62
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods60
▷ Static methods00.00%
▷ Public methods1118.33%
▷ Protected methods4981.67%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
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
images/icon_export.png2.88KB0.20KB▼ 93.01%
addons/jquery-datepicker/images/ui-bg_highlight-soft_75_cccccc_1x100.png0.27KB0.18KB▼ 35.00%
addons/jquery-datepicker/images/ui-icons_2e83ff_256x240.png4.44KB4.17KB▼ 6.02%
addons/jquery-datepicker/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
addons/jquery-datepicker/images/ui-icons_222222_256x240.png6.76KB4.17KB▼ 38.24%