77% csv-to-html

Code Review | CSV to html

WordPress plugin CSV to html scored77%from 54 tests.

About plugin

  • Plugin page: csv-to-html
  • Plugin version: 2.0.6
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 16, 2016
  • Latest release: Nov 12, 2023
  • Number of updates: 127
  • Update frequency: every 21.8 days
  • Top authors: wibergsweb (100%)

Code review

54 tests

User reviews

18 reviews

Install metrics

500+ active /18,504 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by CSV to html
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.23 ▼1.01
Dashboard /wp-admin3.32 ▲0.0243.57 ▼7.92
Posts /wp-admin/edit.php3.44 ▲0.0845.02 ▼0.64
Add New Post /wp-admin/post-new.php5.91 ▲0.0281.74 ▼15.47
Media Library /wp-admin/upload.php3.25 ▲0.0233.30 ▲2.93
CSV to HTML /wp-admin/tools.php?page=csv-to-html3.3234.24

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 162 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by CSV to html
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,035 ▲27313.71 ▼1.0010.87 ▲9.1643.00 ▼1.51
Dashboard /wp-admin2,286 ▲1055.71 ▲0.0599.14 ▼5.1237.73 ▼4.75
Posts /wp-admin/edit.php2,183 ▲832.10 ▲0.1640.08 ▲4.5833.56 ▲0.41
Add New Post /wp-admin/post-new.php1,538 ▲1223.20 ▲0.09681.38 ▼8.4257.80 ▲2.16
Media Library /wp-admin/upload.php1,483 ▲864.36 ▲0.0899.10 ▼1.3341.47 ▼2.52
CSV to HTML /wp-admin/tools.php?page=csv-to-html4,9092.3038.9932.13

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
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/csv-to-html/csvtohtml.php
    • > /wp-content/plugins/csv-to-html/debug.php
  • 75× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Common\\Exception\\SpoutException' not found in wp-content/plugins/csv-to-html/spout-master/src/Spout/Writer/Exception/WriterException.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Common\\Exception\\SpoutException' not found in wp-content/plugins/csv-to-html/spout-master/src/Spout/Common/Exception/UnsupportedTypeException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Writer\\Common\\Manager\\Style\\StyleRegistry' not found in wp-content/plugins/csv-to-html/spout-master/src/Spout/Writer/ODS/Manager/Style/StyleRegistry.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Common\\Creator\\HelperFactory' not found in wp-content/plugins/csv-to-html/spout-master/src/Spout/Writer/ODS/Creator/HelperFactory.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Reader\\ReaderAbstract' not found in wp-content/plugins/csv-to-html/spout-master/src/Spout/Reader/CSV/Reader.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Writer\\Exception\\WriterException' not found in wp-content/plugins/csv-to-html/spout-master/src/Spout/Writer/Exception/WriterNotOpenedException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Reader\\ReaderAbstract' not found in wp-content/plugins/csv-to-html/spout-master/src/Spout/Reader/XLSX/Reader.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Reader\\Exception\\ReaderException' not found in wp-content/plugins/csv-to-html/spout-master/src/Spout/Reader/Exception/SharedStringNotFoundException.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Common\\Creator\\HelperFactory' not found in wp-content/plugins/csv-to-html/spout-master/src/Spout/Reader/XLSX/Creator/HelperFactory.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Box\\Spout\\Common\\Exception\\SpoutException' not found in wp-content/plugins/csv-to-html/spout-master/src/Spout/Common/Exception/IOException.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
The official readme.txt is a good inspiration

csv-to-html/csvtohtml.php 85% from 13 tests

The principal PHP file in "CSV to html" v. 2.0.6 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("csv-to-html.php" instead of "csvtohtml.php")
  • Domain Path: The domain path folder was not found ("/lang")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected11,991 lines of code in 155 files:
LanguageFilesBlank linesComment linesLines of code
PHP1492,8326,37210,818
JavaScript120094742
CSS27615271
Markdown2460116
JSON10044

PHP code 50% from 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 130)
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity8.54
▷ Minimum class complexity1.00
▷ Maximum class complexity535.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity130.00
Code structure
Namespaces49
Interfaces14
Traits1
Classes131
▷ Abstract classes139.92%
▷ Concrete classes11890.08%
▷ Final classes00.00%
Methods832
▷ Static methods445.29%
▷ Public methods55466.59%
▷ Protected methods18121.75%
▷ Private methods9711.66%
Functions8
▷ Named functions00.00%
▷ Anonymous functions8100.00%
Constants215
▷ Global constants00.00%
▷ Class constants215100.00%
▷ Public constants215100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin