84% csv-to-sorttable

Code Review | CSV to SortTable

WordPress plugin CSV to SortTable scored84%from 54 tests.

About plugin

  • Plugin page: csv-to-sorttable
  • Plugin version: 4.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-3.5.1
  • WordPress version: 6.3.1
  • First release: Nov 8, 2011
  • Latest release: Jul 12, 2013
  • Number of updates: 31
  • Update frequency: every 19.7 days
  • Top authors: sscovil (100%)

Code review

54 tests

User reviews

11 reviews

Install metrics

200+ active /11,366 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.00ms] Passed 4 tests

An overview of server-side resources used by CSV to SortTable
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0438.73 ▼0.33
Dashboard /wp-admin3.34 ▲0.0049.79 ▼13.53
Posts /wp-admin/edit.php3.40 ▲0.0448.38 ▼1.36
Add New Post /wp-admin/post-new.php5.93 ▲0.0483.93 ▼20.79
Media Library /wp-admin/upload.php3.27 ▲0.0435.04 ▲2.90

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for CSV to SortTable
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.60 ▼1.141.99 ▲0.3838.65 ▼3.14
Dashboard /wp-admin2,203 ▲125.89 ▲0.03109.99 ▲2.5144.03 ▼2.29
Posts /wp-admin/edit.php2,089 ▼02.13 ▲0.0835.46 ▼3.1635.43 ▼1.73
Add New Post /wp-admin/post-new.php1,534 ▲622.78 ▼0.29671.77 ▲65.8146.13 ▼8.64
Media Library /wp-admin/upload.php1,388 ▲34.20 ▼0.0499.26 ▼1.2744.17 ▲0.63

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/csv-to-sorttable/csv-to-sorttable.php:14

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)
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: sort, table, import, sortable, csv...

csv-to-sorttable/csv-to-sorttable.php Passed 13 tests

The main PHP file in "CSV to SortTable" ver. 4.2 adds more information about the plugin and also serves as the entry point for this plugin
85 characters long description:
Import data from a spreadsheet (.csv file format) and display it in a sortable table.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin654 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript450107349
PHP361195247
CSS412758

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity35.00
▷ Minimum class complexity35.00
▷ Maximum class complexity35.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods15.88%
▷ Public methods1694.12%
▷ Protected methods15.88%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/file-type-icons.png14.68KB4.69KB▼ 68.06%