62% table-creator

Code Review | TableGen - Data Table Generator

WordPress plugin TableGen - Data Table Generator scored62%from 54 tests.

About plugin

  • Plugin page: table-creator
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Mar 8, 2017
  • Latest release: Sep 22, 2022
  • Number of updates: 29
  • Update frequency: every 69.6 days
  • Top authors: aazztech (65.52%)rafiq91 (27.59%)armanul94 (10.34%)exlac (6.9%)

Code review

54 tests

User reviews

8 reviews

Install metrics

400+ active /17,771 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.92MB] [CPU: ▲3.19ms] Passed 4 tests

This is a short check of server-side resources used by TableGen - Data Table Generator
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.38 ▲0.9151.18 ▲11.53
Dashboard /wp-admin4.22 ▲0.9262.56 ▲12.35
Posts /wp-admin/edit.php4.34 ▲0.9855.99 ▲4.97
Add New Post /wp-admin/post-new.php6.80 ▲0.9296.77 ▼11.89
Media Library /wp-admin/upload.php4.15 ▲0.9245.43 ▲8.15
Create table /wp-admin/admin.php?page=create-table-page4.1238.58
Export /wp-admin/admin.php?page=attc-export4.1240.07
Import /wp-admin/admin.php?page=attc-import4.1137.36
Extensions /wp-admin/admin.php?page=attc-extension4.1240.31
All Tables /wp-admin/admin.php?page=table-generator-all4.1237.96

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 77 new files
Database: 2 new tables, 8 new options
New tables
wp_at_meta
wp_at_table_creator
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
attc_db_version
theysaidso_admin_options
widget_recent-posts
tablegen_db_updated
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for TableGen - Data Table Generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲14613.85 ▼0.2815.30 ▲13.6543.64 ▼0.05
Dashboard /wp-admin2,231 ▲515.61 ▼0.0385.58 ▼16.6636.82 ▼4.99
Posts /wp-admin/edit.php2,136 ▲361.97 ▼0.0339.28 ▲0.1035.33 ▲0.23
Add New Post /wp-admin/post-new.php1,566 ▲3123.13 ▲4.91642.55 ▲7.6645.75 ▼23.33
Media Library /wp-admin/upload.php1,436 ▲394.20 ▲0.0398.75 ▼2.7646.24 ▼1.33
Create table /wp-admin/admin.php?page=create-table-page9342.3028.7878.13
Export /wp-admin/admin.php?page=attc-export9392.3728.8641.07
Import /wp-admin/admin.php?page=attc-import1,0362.3426.4643.62
Extensions /wp-admin/admin.php?page=attc-extension8982.3027.6829.37
All Tables /wp-admin/admin.php?page=table-generator-all1,0722.3728.0834.17

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie tables were found after uninstall: 2 tables
    • wp_at_table_creator
    • wp_at_meta
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • attc_db_version
    • tablegen_db_updated
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=attc-import
    • > Notice in wp-content/plugins/table-creator/views/view-import.php+44
    Undefined variable: table

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
Please take a closer look at the following
  • 19× GET requests to PHP files return non-empty strings (only 10 are shown):
    • > /wp-content/plugins/table-creator/views/import/google-sheet.php
    • > /wp-content/plugins/table-creator/includes/classes/ATTC_enqueue.php
    • > /wp-content/plugins/table-creator/libs/evalmath.class.php
    • > /wp-content/plugins/table-creator/libs/csv-parser.class.php
    • > /wp-content/plugins/table-creator/includes/classes/ATTC_import.php
    • > /wp-content/plugins/table-creator/views/view-extension.php
    • > /wp-content/plugins/table-creator/tablegen-data-table-generator.php
    • > /wp-content/plugins/table-creator/includes/classes/ATTC_controller.php
    • > /wp-content/plugins/table-creator/includes/classes/ATTC_database.php
    • > /wp-content/plugins/table-creator/config.php
  • 19× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/table-creator/views/view-create-table-tab.php:19
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/table-creator/views/shortcode/normal-table.php on line 5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/table-creator/views/shortcode/advanced-table.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/table-creator/views/view-export.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/table-creator/views/shortcode/advanced-table.php:50
    • > PHP Notice
      Undefined variable: args in wp-content/plugins/table-creator/views/view-table-setting.php on line 4
    • > PHP Notice
      Undefined variable: ATTC in wp-content/plugins/table-creator/views/view-edit-table.php on line 26
    • > PHP Fatal error
      Uncaught Error: Call to a member function loadView() on null in wp-content/plugins/table-creator/views/view-edit-table.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/table-creator/views/view-import.php:21
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/table-creator/views/view-table-setting.php on line 4

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 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: data table, table, table generator, html table, responsive data table

table-creator/tablegen-data-table-generator.php 77% from 13 tests

Analyzing the main PHP file in "TableGen - Data Table Generator" version 1.3.1
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("table-creator.php" instead of "tablegen-data-table-generator.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Description: Keep the plugin description shorter than 140 characters (currently 250 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected16,967 lines of code in 64 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript162,2557,2547,829
PHP291,0312,6485,113
CSS181822963,737
SVG100288

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity49.94
▷ Minimum class complexity3.00
▷ Maximum class complexity229.00
Average method complexity4.08
▷ Minimum method complexity1.00
▷ Maximum method complexity64.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes16.25%
Methods253
▷ Static methods3413.44%
▷ Public methods19075.10%
▷ Protected methods5120.16%
▷ Private methods124.74%
Functions14
▷ Named functions1178.57%
▷ Anonymous functions321.43%
Constants80
▷ Global constants7695.00%
▷ Class constants45.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
5 compressed PNG files occupy 0.00MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/assets/css/DataTables-1.10.13/images/sort_desc.png0.15KB0.25KB0.00%
public/assets/css/DataTables-1.10.13/images/sort_asc_disabled.png0.14KB0.25KB0.00%
public/assets/css/DataTables-1.10.13/images/sort_desc_disabled.png0.14KB0.25KB0.00%
public/assets/css/DataTables-1.10.13/images/sort_asc.png0.16KB0.25KB0.00%
public/assets/css/DataTables-1.10.13/images/sort_both.png0.20KB0.29KB0.00%