77% feed2post-ircf

Code Review | Import CSV, Excel, XML, JSON, SQL and multiple formats as posts or users (Feed2Post)

WordPress plugin Import CSV, Excel, XML, JSON, SQL and multiple formats as posts or users (Feed2Post) scored77%from 54 tests.

About plugin

  • Plugin page: feed2post-ircf
  • Plugin version: 1.21
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Sep 12, 2022
  • Latest release: Nov 8, 2023
  • Number of updates: 27
  • Update frequency: every 15.7 days
  • Top authors: ircf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /715 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.71MB] [CPU: ▼4.65ms] Passed 4 tests

Analyzing server-side resources used by Import CSV, Excel, XML, JSON, SQL and multiple formats as posts or users (Feed2Post)
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.20 ▲0.7344.21 ▼6.82
Dashboard /wp-admin4.03 ▲0.6850.64 ▼20.97
Posts /wp-admin/edit.php4.08 ▲0.7253.53 ▲5.61
Add New Post /wp-admin/post-new.php6.61 ▲0.7296.11 ▲3.60
Media Library /wp-admin/upload.php3.95 ▲0.7240.21 ▲6.07
Settings /wp-admin/edit.php?post_type=feed2post_feed&page=feed2post_options3.9335.01
Feeds /wp-admin/edit.php?post_type=feed2post_feed4.0040.95
Add /wp-admin/post-new.php?post_type=feed2post_feed4.1547.00
Log file /wp-admin/edit.php?post_type=feed2post_feed&page=feed2post_log3.9338.33

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 1,296 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
feed2post_log_file
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Import CSV, Excel, XML, JSON, SQL and multiple formats as posts or users (Feed2Post)
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲4114.32 ▲0.111.58 ▼0.3241.86 ▼2.29
Dashboard /wp-admin2,230 ▲565.62 ▲0.0688.86 ▼6.6843.74 ▲5.20
Posts /wp-admin/edit.php2,135 ▲353.44 ▲1.4772.14 ▲38.0135.52 ▼1.10
Add New Post /wp-admin/post-new.php1,555 ▲2023.27 ▼1.55672.71 ▲38.8349.81 ▼14.70
Media Library /wp-admin/upload.php1,435 ▲324.17 ▼0.0299.70 ▼1.4442.88 ▼1.56
Settings /wp-admin/edit.php?post_type=feed2post_feed&page=feed2post_options1,2563.7673.7638.97
Feeds /wp-admin/edit.php?post_type=feed2post_feed1,0953.4944.5027.84
Add /wp-admin/post-new.php?post_type=feed2post_feed1,5192.4851.7649.73
Log file /wp-admin/edit.php?post_type=feed2post_feed&page=feed2post_log8243.5536.4124.98

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • feed2post_log_file
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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 items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/feed2post-ircf/vendor/markbaker/matrix/buildPhar.php
  • 585× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_URIScheme' not found in wp-content/plugins/feed2post-ircf/vendor/ezyang/htmlpurifier/library/HTMLPurifier/URIScheme/mailto.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\IRenderer' not found in wp-content/plugins/feed2post-ircf/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:27
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/feed2post-ircf/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/DateTimeExcel/Days360.php on line 10
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/feed2post-ircf/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Information/Value.php on line 13
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/feed2post-ircf/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/TextData/Concatenate.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'Feed2Post_Feed' not found in wp-content/plugins/feed2post-ircf/includes/feed/feed2post-csv.php:2
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/feed2post-ircf/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/MathTrig/Exp.php on line 8
    • > PHP Fatal error
      Trait 'PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/feed2post-ircf/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Statistical/Permutations.php on line 11
    • > PHP Fatal error
      Uncaught Error: Interface 'PhpOffice\\PhpSpreadsheet\\Cell\\IValueBinder' not found in wp-content/plugins/feed2post-ircf/vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Cell/DefaultValueBinder.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'HTMLPurifier_Strategy_Composite' not found in wp-content/plugins/feed2post-ircf/vendor/ezyang/htmlpurifier/library/HTMLPurifier/Strategy/Core.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 26 tag instead of maximum 10
You can take inspiration from this readme.txt

feed2post-ircf/feed2post.php 85% from 13 tests

The main PHP file in "Import CSV, Excel, XML, JSON, SQL and multiple formats as posts or users (Feed2Post)" ver. 1.21 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("feed2post-ircf.php" instead of "feed2post.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin124,926 lines of code in 1,091 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,00924,00960,027118,277
Markdown311,03703,104
JSON17001,665
CSS45628588
PO File1240299576
YAML7692288
XML7222162
JavaScript479129
reStructuredText9115236122
Twig11014
INI1111

PHP code 0% from 2 tests

A short review of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,020)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 333)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity18.70
▷ Minimum class complexity1.00
▷ Maximum class complexity1,020.00
Average method complexity3.54
▷ Minimum method complexity1.00
▷ Maximum method complexity333.00
Code structure
Namespaces109
Interfaces42
Traits6
Classes925
▷ Abstract classes566.05%
▷ Concrete classes86993.95%
▷ Final classes91.04%
Methods6,967
▷ Static methods1,86526.77%
▷ Public methods5,13073.63%
▷ Protected methods5187.44%
▷ Private methods1,31918.93%
Functions253
▷ Named functions16364.43%
▷ Anonymous functions9035.57%
Constants1,609
▷ Global constants110.68%
▷ Class constants1,59899.32%
▷ Public constants1,40287.73%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/marker-shadow.png0.60KB1.16KB0.00%
assets/images/marker-icon.png1.43KB1.55KB0.00%