84% csv-posts-importer

Code Review | CSV Posts Importer

WordPress plugin CSV Posts Importer scored84%from 54 tests.

About plugin

  • Plugin page: csv-posts-importer
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.7.2
  • WordPress version: 6.3.1
  • First release: Mar 17, 2017
  • Latest release: Mar 17, 2017
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: groupbwt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /655 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.86ms] Passed 4 tests

This is a short check of server-side resources used by CSV Posts Importer
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.37 ▼0.47
Dashboard /wp-admin3.32 ▲0.0248.66 ▼4.75
Posts /wp-admin/edit.php3.38 ▲0.0250.64 ▲3.03
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.72 ▼12.08
Media Library /wp-admin/upload.php3.25 ▲0.0236.93 ▲1.88

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for CSV Posts Importer
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7014.47 ▲0.182.17 ▲0.2143.36 ▲0.13
Dashboard /wp-admin2,222 ▲344.87 ▼0.03112.20 ▲5.4442.04 ▲0.93
Posts /wp-admin/edit.php2,102 ▲102.03 ▼0.0339.47 ▲0.6133.70 ▼1.86
Add New Post /wp-admin/post-new.php1,548 ▲2023.14 ▲4.95653.19 ▲45.1351.22 ▲2.02
Media Library /wp-admin/upload.php1,404 ▲164.16 ▼0.1795.84 ▼14.4642.62 ▼4.36

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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
Please take a closer look at the following
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Cannot access self:: when no class scope is active in wp-content/plugins/csv-posts-importer/views/main.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-posts-importer/views/table.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/csv-posts-importer/views/progress.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/csv-posts-importer/bwt-csv-importer.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: importer, csv, post, acf

csv-posts-importer/bwt-csv-importer.php 92% from 13 tests

"CSV Posts Importer" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("csv-posts-importer.php" instead of "bwt-csv-importer.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected832 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7109190548
JavaScript2103149
CSS1220135

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.62
Average class complexity107.00
▷ Minimum class complexity107.00
▷ Maximum class complexity107.00
Average method complexity5.24
▷ Minimum method complexity1.00
▷ Maximum method complexity58.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods25
▷ Static methods25100.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants266.67%
▷ Class constants133.33%
▷ Public constants1100.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