89% simple-csv-tables

Code Review | Simple CSV Tables

WordPress plugin Simple CSV Tables scored 89% from 54 tests.

About plugin

  • Plugin page: simple-csv-tables
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.9
  • WordPress version: 5.9.2
  • First release: Mar 13, 2020
  • Latest release: Feb 18, 2022
  • Number of updates: 10
  • Update frequency: every 70.7 days
  • Top authors: sirvelia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 335 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.31MB] [CPU: ▼296.73ms] Passed 4 tests

A check of server-side resources used by Simple CSV Tables
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.86 ▲0.3554.76 ▲3.99
Dashboard /wp-admin3.73 ▲0.3338.89 ▲4.07
Posts /wp-admin/edit.php3.95 ▲0.3042.76 ▲5.60
Add New Post /wp-admin/post-new.php7.25 ▲0.2896.81 ▼1,187.37
Media Library /wp-admin/upload.php3.65 ▲0.3525.34 ▼7.59
Add New /wp-admin/post-new.php?post_type=csv-table3.9449.44
CSV tables /wp-admin/edit.php?post_type=csv-table3.7328.56

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 460 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Simple CSV Tables
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,153 ▲39920.73 ▲5.105.97 ▲0.162.17 ▼0.39
Dashboard /wp-admin3,257 ▲40610.48 ▲4.26193.03 ▲57.79154.19 ▼15.52
Posts /wp-admin/edit.php3,117 ▲4237.79 ▲4.56107.45 ▲43.81137.63 ▼6.11
Add New Post /wp-admin/post-new.php1,821 ▲6917.50 ▼4.48443.13 ▼2.36179.11 ▲19.98
Media Library /wp-admin/upload.php1,895 ▲2007.82 ▲2.29135.57 ▼9.21182.38 ▼8.80
Add New /wp-admin/post-new.php?post_type=csv-table2,3978.41146.88126.07
CSV tables /wp-admin/edit.php?post_type=csv-table1,8027.70103.09120.65

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 50% 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 0% 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
Almost there! Just fix the following items
  • 3× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/simple-csv-tables/admin/partials/simple-csv-tables-admin-display.php
    • > /wp-content/plugins/simple-csv-tables/vendor/htmlburger/carbon-fields/templates/Exception/incorrect-syntax.php
    • > /wp-content/plugins/simple-csv-tables/public/partials/simple-csv-tables-public-display.php
  • 112× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Condition\\Condition' not found in wp-content/plugins/simple-csv-tables/vendor/htmlburger/carbon-fields/core/Container/Condition/Term_Level_Condition.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Datastore\\Post_Meta_Datastore' not found in wp-content/plugins/simple-csv-tables/vendor/htmlburger/carbon-fields/core/Datastore/Nav_Menu_Item_Datastore.php:7
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/simple-csv-tables/vendor/htmlburger/carbon-fields/templates/Container/common/options-page.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Textarea_Field' not found in wp-content/plugins/simple-csv-tables/vendor/htmlburger/carbon-fields/core/Field/Rich_Text_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Container' not found in wp-content/plugins/simple-csv-tables/vendor/htmlburger/carbon-fields/core/Container/Comment_Meta_Container.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Scripts_Field' not found in wp-content/plugins/simple-csv-tables/vendor/htmlburger/carbon-fields/core/Field/Header_Scripts_Field.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PHPSTORM_META\\override() in wp-content/plugins/simple-csv-tables/vendor/htmlburger/carbon-fields/.phpstorm.meta.php/ioc.meta.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Container\\Fulfillable\\Translator\\Translator' not found in wp-content/plugins/simple-csv-tables/vendor/htmlburger/carbon-fields/core/Container/Fulfillable/Translator/Array_Translator.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Select_Field' not found in wp-content/plugins/simple-csv-tables/vendor/htmlburger/carbon-fields/core/Field/Radio_Image_Field.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Carbon_Fields\\Field\\Field' not found in wp-content/plugins/simple-csv-tables/vendor/htmlburger/carbon-fields/core/Field/Date_Field.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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: shortcode, csv, table, datatables

simple-csv-tables/simple-csv-tables.php Passed 13 tests

The entry point to "Simple CSV Tables" version 1.0.2 is a PHP file that has certain tags in its header comment area
77 characters long description:
Displays html tables from .csv files using a simple shortcode for each table.

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
No dangerous file extensions were detected27,323 lines of code in 412 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1745,1888,48613,070
PHP1542,5526,9728,787
Sass4833401,746
PO File206107791,652
CSS103261,1581,645
JSON300355
Markdown324068

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity7.92
▷ Minimum class complexity1.00
▷ Maximum class complexity50.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces22
Interfaces5
Traits0
Classes127
▷ Abstract classes118.66%
▷ Concrete classes11691.34%
▷ Final classes10.86%
Methods915
▷ Static methods9310.16%
▷ Public methods74381.20%
▷ Protected methods16317.81%
▷ Private methods90.98%
Functions104
▷ Named functions2423.08%
▷ Anonymous functions8076.92%
Constants30
▷ Global constants723.33%
▷ Class constants2376.67%
▷ Public constants23100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin