84% aj-csv-to-datatable

Code Review | AJ CSV to DataTable

WordPress plugin AJ CSV to DataTable scored84%from 54 tests.

About plugin

  • Plugin page: aj-csv-to-datatable
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.7.5
  • WordPress version: 6.3.1
  • First release: Oct 30, 2015
  • Latest release: Dec 13, 2017
  • Number of updates: 11
  • Update frequency: every 70.8 days
  • Top authors: anjanasilva (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,424 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

An overview of server-side resources used by AJ CSV to DataTable
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0348.19 ▲6.82
Dashboard /wp-admin3.34 ▲0.0450.64 ▼2.31
Posts /wp-admin/edit.php3.39 ▲0.0349.71 ▼1.29
Add New Post /wp-admin/post-new.php5.92 ▲0.0397.57 ▼6.27
Media Library /wp-admin/upload.php3.27 ▲0.0339.64 ▲5.08

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for AJ CSV to DataTable
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.31 ▼0.122.12 ▲0.3841.41 ▼2.64
Dashboard /wp-admin2,198 ▲215.59 ▼0.0092.20 ▲2.1840.55 ▲0.98
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0638.22 ▼1.6835.00 ▼1.05
Add New Post /wp-admin/post-new.php1,536 ▲1022.90 ▼0.55695.50 ▼11.5455.90 ▲5.09
Media Library /wp-admin/upload.php1,394 ▼64.24 ▲0.0198.25 ▼5.3843.25 ▼4.33

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/aj-csv-to-datatable/aj-csv-to-datatable.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)
Everything seems fine, but this is not an exhaustive test


Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed: You can look at the official readme.txt

aj-csv-to-datatable/aj-csv-to-datatable.php Passed 13 tests

The main PHP file in "AJ CSV to DataTable" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
77 characters long description:
Import data from a spreadsheet (.csv file format) and display in a DataTable.

Code Analysis Passed 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
Everything looks great! No dangerous files found in this plugin422 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity34.00
▷ Minimum class complexity34.00
▷ Maximum class complexity34.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods17.14%
▷ Public methods1392.86%
▷ Protected methods17.14%
▷ Private methods00.00%
▷ Named functions2100.00%
▷ Anonymous functions00.00%
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 compressed PNG files occupy 0.02MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/file-type-icons.png14.68KB4.69KB▼ 68.06%