10% wptables

Code Review | WordPress Tables

WordPress plugin WordPress Tables scored 10% from 54 tests.

About plugin

  • Plugin page: wptables
  • Plugin version: 1.3.9
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.4
  • WordPress version: 5.8.1
  • First release: May 30, 2017
  • Latest release: Feb 11, 2018
  • Number of updates: 59
  • Update frequency: every 4.4 days
  • Top authors: iansadovy (100%)

Code review

54 tests

User reviews

34 reviews

Install metrics

3,000+ active / 42,154 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wptables/includes/data/class-wptables-csv-parser.php+581
    Array and string offset access syntax with curly braces is deprecated

Server metrics [RAM: ▼1.49MB] [CPU: ▼186.53ms] Passed 4 tests

This is a short check of server-side resources used by WordPress Tables
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼0.699.98 ▼10.63
Dashboard /wp-admin2.16 ▼0.905.26 ▼32.97
Posts /wp-admin/edit.php2.16 ▼0.954.94 ▼26.30
Add New Post /wp-admin/post-new.php2.16 ▼3.285.85 ▼670.61
Media Library /wp-admin/upload.php2.16 ▼0.845.23 ▼16.24
Add New /wp-admin/admin.php?page=wptables-add-new2.165.28
WPTables /wp-admin/admin.php?page=wptables2.165.66
About /wp-admin/admin.php?page=wptables-about2.165.14

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 263 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Tables
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,857 ▲25617.89 ▲1.858.84 ▲3.6375.22 ▼2.21
Dashboard /wp-admin2,986 ▲917.79 ▲1.68168.80 ▲34.20166.05 ▼5.13
Posts /wp-admin/edit.php2,805 ▲654.34 ▲1.1173.36 ▲9.03149.60 ▲9.97
Add New Post /wp-admin/post-new.php3,747 ▲9420.12 ▲1.55440.60 ▲18.00187.47 ▲18.73
Media Library /wp-admin/upload.php1,805 ▲537.04 ▲1.49133.27 ▼16.15189.45 ▼12.12
Add New /wp-admin/admin.php?page=wptables-add-new2,0264.1772.56166.90
WPTables /wp-admin/admin.php?page=wptables1,4143.9563.47100.98
About /wp-admin/admin.php?page=wptables-about1,4613.9464.88122.78

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wptables/includes/data/class-wptables-csv-parser.php+581
    Array and string offset access syntax with curly braces is deprecated

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 48 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wptables-about
    • > Deprecated in wp-content/plugins/wptables/includes/data/class-wptables-csv-parser.php+1088
    Array and string offset access syntax with curly braces is deprecated

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
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wptables/public/partials/plugin-name-public-display.php
  • 13× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wptables/admin/partials/view-wptables-add-new-table-json.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_meta_box() in wp-content/plugins/wptables/admin/partials/view-wptables-about.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WPTables_ListView' not found in wp-content/plugins/wptables/admin/partials/view-wptables-admin.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'WPTables_Parser' not found in wp-content/plugins/wptables/includes/data/class-wptables-csv-parser.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wptables/admin/partials/view-wptables-add-new-table-csv.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WPTables_Parser' not found in wp-content/plugins/wptables/includes/data/class-wptables-json-parser.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wptables/admin/partials/view-wptables-add-new-table-mysql.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wptables/admin/partials/view-wptables-add-new-table-manual.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WPTables_View' not found in wp-content/plugins/wptables/admin/partials/view-wptables-list-tables.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WPTables_Parser' not found in wp-content/plugins/wptables/includes/data/class-wptables-mysql-parser.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: mysql to table, excel table, responsive tables, csv to table, data tables...

wptables/wptables.php Passed 13 tests

The main PHP script in "WordPress Tables" version 1.3.9 is automatically included on every request by WordPress
120 characters long description:
Create, manage and design interactive tables without writing any code. Sorting, paging, formatting and lot more options.

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
Success! There were no dangerous files found in this plugin84,957 lines of code in 239 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript19620,88226,97879,055
CSS104783142,818
PHP293347102,539
LESS17515477
JSON10028
Markdown110025
SVG10015

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity20.14
▷ Minimum class complexity1.00
▷ Maximum class complexity197.00
Average method complexity3.70
▷ Minimum method complexity1.00
▷ Maximum method complexity61.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes29.52%
▷ Concrete classes1990.48%
▷ Final classes00.00%
Methods150
▷ Static methods138.67%
▷ Public methods9764.67%
▷ Protected methods3926.00%
▷ Private methods149.33%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants342.86%
▷ Class constants457.14%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/csv.png3.73KB1.87KB▼ 49.97%
admin/img/manual.png4.46KB2.46KB▼ 44.78%
admin/img/json.png4.11KB2.08KB▼ 49.34%
admin/img/mysql.png6.77KB3.78KB▼ 44.12%