67% wpdatatables

Code Review | wpDataTables - WordPress Data Table, Dynamic Tables & Table Charts Plugin

WordPress plugin wpDataTables - WordPress Data Table, Dynamic Tables & Table Charts Plugin scored67%from 54 tests.

About plugin

  • Plugin page: wpdatatables
  • Plugin version: 2.1.76
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 30, 2015
  • Latest release: Nov 27, 2023
  • Number of updates: 133
  • Update frequency: every 22.0 days
  • Top authors: wpDataTables (100%)

Code review

54 tests

User reviews

359 reviews

Install metrics

70,000+ active /1,187,313 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲2.45MB] [CPU: ▲9.26ms] 75% from 4 tests

Server-side resources used by wpDataTables - WordPress Data Table, Dynamic Tables & Table Charts Plugin
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 1,305.38ms on /wp-admin/admin.php?page=wpdatatables-dashboard)
PageMemory (MB)CPU Time (ms)
Home /5.72 ▲2.2551.35 ▲9.07
Dashboard /wp-admin5.81 ▲2.4762.20 ▼2.10
Posts /wp-admin/edit.php5.93 ▲2.5765.75 ▲15.63
Add New Post /wp-admin/post-new.php8.44 ▲2.56102.04 ▲14.44
Media Library /wp-admin/upload.php5.74 ▲2.5157.32 ▲23.23
Welcome page /wp-admin/admin.php?page=wpdatatables-welcome-page5.8556.48
Dashboard /wp-admin/admin.php?page=wpdatatables-dashboard5.961,305.38
wpDataTables /wp-admin/admin.php?page=wpdatatables-administration5.7955.21
Settings /wp-admin/admin.php?page=wpdatatables-settings5.9757.10
Addons /wp-admin/admin.php?page=wpdatatables-add-ons5.8054.16
Go Premium /wp-admin/admin.php?page=wpdatatables-lite-vs-premium5.9353.32
Create a Chart /wp-admin/admin.php?page=wpdatatables-chart-wizard6.0058.30
Getting Started /wp-admin/admin.php?page=wpdatatables-getting-started5.8360.45
wpDataCharts /wp-admin/admin.php?page=wpdatatables-charts5.7854.32
Get Help /wp-admin/admin.php?page=wpdatatables-support5.7852.82

Server storage [IO: ▲42.17MB] [DB: ▲0.01MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please try to fix the following items
  • Try to limit filesystem usage to 25MB (currently using 42.17MB)
Filesystem: 1,582 new files
Database: 5 new tables, 48 new options
New tables
wp_wpdatatables_cache
wp_wpdatatables
wp_wpdatacharts
wp_wpdatatables_columns
wp_wpdatatables_rows
New WordPress options
wdtBaseSkin
wdtAutoUpdateHash
wdtSortingOrderBrowseTables
wdtCSVDelimiter
widget_recent-posts
wdtDecimalPlaces
wdtInterfaceLanguage
wdtMySqlUser
wdtDateFormat
wdtMySqlDB
...

Browser metrics Passed 4 tests

An overview of browser requirements for wpDataTables - WordPress Data Table, Dynamic Tables & Table Charts Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,871 ▲12414.57 ▲0.171.51 ▼0.2426.63 ▼15.51
Dashboard /wp-admin2,270 ▲1005.76 ▲0.1197.22 ▼6.6844.19 ▲4.14
Posts /wp-admin/edit.php2,177 ▲742.03 ▲0.0939.63 ▲3.5639.00 ▲4.52
Add New Post /wp-admin/post-new.php6,431 ▲4,90227.73 ▲4.45827.12 ▲213.0937.32 ▼9.96
Media Library /wp-admin/upload.php1,482 ▲824.38 ▲0.1997.98 ▲3.5943.53 ▲2.16
Welcome page /wp-admin/admin.php?page=wpdatatables-welcome-page4,5353.6286.15154.37
Dashboard /wp-admin/admin.php?page=wpdatatables-dashboard4,5224.1276.91293.52
wpDataTables /wp-admin/admin.php?page=wpdatatables-administration1,7793.6260.35102.31
Settings /wp-admin/admin.php?page=wpdatatables-settings5,8106.26141.35129.18
Addons /wp-admin/admin.php?page=wpdatatables-add-ons1,6433.8555.2494.25
Go Premium /wp-admin/admin.php?page=wpdatatables-lite-vs-premium3,4583.5961.30125.39
Create a Chart /wp-admin/admin.php?page=wpdatatables-chart-wizard5,0177.02125.99101.67
Getting Started /wp-admin/admin.php?page=wpdatatables-getting-started1,7883.8955.22119.07
wpDataCharts /wp-admin/admin.php?page=wpdatatables-charts1,7574.0160.39101.81
Get Help /wp-admin/admin.php?page=wpdatatables-support1,8703.8550.8491.99

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 5 tables in the database
    • wp_wpdatatables
    • wp_wpdatacharts
    • wp_wpdatatables_rows
    • wp_wpdatatables_cache
    • wp_wpdatatables_columns
  • The uninstall procedure has failed, leaving 48 options in the database
    • wdtTablesPerPage
    • wdtMySqlHost
    • wdtSimpleTableAlert
    • wdtPurchaseCode
    • wdtMobileWidth
    • wdtSortingOrderBrowseTables
    • wdtInstallDate
    • wdtTempFutureDate
    • wdtBorderRemovalHeader
    • wdtLeftOffset
    • ...

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 everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 296× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wpdatatables/source/lang/spanish.inc.php
    • > /wp-content/plugins/wpdatatables/templates/admin/common/ratingDiv.inc.php
    • > /wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/samples/Basic/31_Document_properties_write_xls.php
    • > /wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/samples/Basic/17_Html.php
    • > /wp-content/plugins/wpdatatables/templates/wpdatachart.inc.php
    • > /wp-content/plugins/wpdatatables/source/class.datetime.wpdatacolumn.php
    • > /wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/samples/Chart/33_Chart_create_column.php
    • > /wp-content/plugins/wpdatatables/source/lang/russian.inc.php
    • > /wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/samples/Reader/10_Simple_file_reader_using_a_configurable_read_filter.php
    • > /wp-content/plugins/wpdatatables/templates/frontend/filter_form.inc.php
  • 4091× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type float in wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php on line 351
    • > PHP Notice
      Trying to access array offset on value of type float in wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php on line 351
    • > PHP Notice
      Trying to access array offset on value of type float in wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/DataSeriesValues.php on line 351
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOffice\\PhpSpreadsheet\\Worksheet\\BaseDrawing' not found in wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Worksheet/Drawing.php:7
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php on line 1106
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php on line 1106
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php on line 3346
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php on line 1106
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Xlsx/Worksheet.php on line 1106
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wpdatatables/lib/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Calculation/Calculation.php on line 3346

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 51 tag instead of maximum 10
You can take inspiration from this readme.txt

wpdatatables/wpdatatables.php Passed 13 tests

This is the main PHP file of "wpDataTables - WordPress Data Table, Dynamic Tables & Table Charts Plugin" version 2.1.76, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
127 characters long description:
Create responsive, sortable tables & charts from Excel, CSV or PHP. Add tables & charts to any post in minutes with DataTables.

Code Analysis 95% 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
There were no executable files found in this plugin430,356 lines of code in 1,100 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript26323,31136,794166,879
PHP64017,76536,32992,113
CSS866,59899647,604
PO File1118,59929,51142,532
XML51039,757
JSON110020,337
Markdown322,619010,408
SVG304329,949
C#10451318
JSX34012160
YAML61912112
HTML1240106
MSBuild script10757
Bourne Again Shell16324

PHP code 0% from 2 tests

Analyzing cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,016)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 387)
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity38.72
▷ Minimum class complexity1.00
▷ Maximum class complexity1,016.00
Average method complexity4.11
▷ Minimum method complexity1.00
▷ Maximum method complexity387.00
Code structure
Namespaces52
Interfaces12
Traits2
Classes292
▷ Abstract classes165.48%
▷ Concrete classes27694.52%
▷ Final classes10.36%
Methods3,745
▷ Static methods84422.54%
▷ Public methods3,08482.35%
▷ Protected methods992.64%
▷ Private methods56215.01%
Functions171
▷ Named functions12975.44%
▷ Anonymous functions4224.56%
Constants835
▷ Global constants263.11%
▷ Class constants80996.89%
▷ Public constants809100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
153 PNG files occupy 6.16MB with 2.60MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
integrations/page_builders/wpbakery/assets/img/vc-charts-icon.png0.49KB0.21KB▼ 57.80%
lib/phpoffice/phpspreadsheet/docs/topics/images/04-05-topten-autofilter-1.png52.48KB18.18KB▼ 65.36%
assets/img/smile.png2.42KB1.83KB▼ 24.29%
assets/img/hint-pictures/rows_per_page.png47.90KB17.43KB▼ 63.61%
assets/css/minimal.png1.09KB1.45KB0.00%