68% tablepress

Code Review | TablePress - Tables in WordPress made easy

WordPress plugin TablePress - Tables in WordPress made easy scored68%from 54 tests.

About plugin

  • Plugin page: tablepress
  • Plugin version: 2.2.3
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.4
  • WordPress version: 6.3.1
  • First release: Jun 14, 2012
  • Latest release: Nov 13, 2023
  • Number of updates: 189
  • Update frequency: every 22.1 days
  • Top authors: TobiasBg (100%)

Code review

54 tests

User reviews

4505 reviews

Install metrics

800,000+ active /13,239,953 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: ▲4.97MB] [CPU: ▲26.20ms] Passed 4 tests

Server-side resources used by TablePress - Tables in WordPress made easy
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.62 ▲5.1567.43 ▲25.76
Dashboard /wp-admin8.64 ▲5.3377.96 ▲28.20
Posts /wp-admin/edit.php8.64 ▲5.2887.14 ▲39.07
Add New Post /wp-admin/post-new.php9.99 ▲4.10116.39 ▲13.11
Media Library /wp-admin/upload.php8.64 ▲5.4171.29 ▲37.73
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius8.6468.49

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 1,007 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
db_upgraded
fs_debug_mode
theysaidso_admin_options
fs_active_plugins
fs_accounts
widget_theysaidso_widget
widget_recent-comments
tablepress_plugin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TablePress - Tables in WordPress made easy
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,824 ▲6214.67 ▲0.331.55 ▼0.0932.18 ▼12.35
Dashboard /wp-admin2,224 ▲465.50 ▼0.2499.22 ▼20.7245.99 ▲1.32
Posts /wp-admin/edit.php2,133 ▲331.97 ▲0.0140.27 ▲3.8139.51 ▲4.70
Add New Post /wp-admin/post-new.php1,717 ▲19121.82 ▼1.43682.38 ▲6.0537.12 ▼11.80
Media Library /wp-admin/upload.php1,432 ▲324.17 ▼0.0298.82 ▼18.0247.06 ▲1.10
Freemius Debug [v.2.6.0] /wp-admin/admin.php?page=freemius1,0841.6625.5229.91

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
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/tablepress/libraries/freemius/includes/class-freemius.php+8546
    Undefined property: stdClass::$plugins
  • Zombie WordPress options detected upon uninstall: 10 options
    • widget_recent-comments
    • tablepress_plugin_options
    • fs_active_plugins
    • fs_debug_mode
    • widget_recent-posts
    • fs_accounts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 45× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/tablepress/libraries/csstidy/data.inc.php
    • > /wp-content/plugins/tablepress/classes/class-wp_user_option.php
    • > /wp-content/plugins/tablepress/views/class-all-tables-list-table.php
    • > /wp-content/plugins/tablepress/classes/class-css.php
    • > /wp-content/plugins/tablepress/views/view-preview_table.php
    • > /wp-content/plugins/tablepress/classes/class-import.php
    • > /wp-content/plugins/tablepress/classes/class-controller.php
    • > /wp-content/plugins/tablepress/views/view-edit.php
    • > /wp-content/plugins/tablepress/libraries/csstidy/class.csstidy_optimise.php
    • > /wp-content/plugins/tablepress/views/view-add.php
  • 224× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'TablePress\\Matrix\\Operators\\Operator' not found in wp-content/plugins/tablepress/libraries/vendor/Matrix/Operators/Multiplication.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'TablePress\\Psr\\SimpleCache\\CacheInterface' not found in wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Collection/Memory/SimpleCache1.php:14
    • > PHP Fatal error
      Trait 'TablePress\\PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Calculation/MathTrig/Factorial.php on line 11
    • > PHP Fatal error
      Uncaught Error: Interface 'TablePress\\PhpOffice\\PhpSpreadsheet\\Chart\\Renderer\\IRenderer' not found in wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Chart/Renderer/JpGraphRendererBase.php:27
    • > PHP Fatal error
      Trait 'TablePress\\PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Calculation/Engineering/BesselI.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'TablePress\\PhpOffice\\PhpSpreadsheet\\Reader\\Ods\\BaseLoader' not found in wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Reader/Ods/DefinedNames.php:9
    • > PHP Fatal error
      Trait 'TablePress\\PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Calculation/TextData/CharacterConvert.php on line 9
    • > PHP Fatal error
      Trait 'TablePress\\PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Calculation/Statistical/Distributions/Poisson.php on line 10
    • > PHP Fatal error
      Trait 'TablePress\\PhpOffice\\PhpSpreadsheet\\Calculation\\ArrayEnabled' not found in wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Calculation/Statistical/Confidence.php on line 10
    • > PHP Fatal error
      Uncaught Error: Class 'TablePress\\PhpOffice\\PhpSpreadsheet\\Style\\Supervisor' not found in wp-content/plugins/tablepress/libraries/vendor/PhpOffice/PhpSpreadsheet/Style/Protection.php:5

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 on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: table, html, excel, tables, spreadsheet...

tablepress/tablepress.php Passed 13 tests

The entry point to "TablePress - Tables in WordPress made easy" version 2.2.3 is a PHP file that has certain tags in its header comment area
117 characters long description:
Embed beautiful and interactive tables into your WordPress website’s posts and pages, without having to write code!

Code Analysis 95% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected137,445 lines of code in 804 files:
LanguageFilesBlank linesComment linesLines of code
PHP72424,37162,492114,349
JavaScript403,1394,29018,771
CSS27527533,069
Sass1218801,227
JSON10029

PHP code 0% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
These items need your attention
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 3,096)
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 333)
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity30.03
▷ Minimum class complexity1.00
▷ Maximum class complexity3,096.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity333.00
Code structure
Namespaces75
Interfaces31
Traits1
Classes556
▷ Abstract classes346.12%
▷ Concrete classes52293.88%
▷ Final classes20.38%
Methods6,371
▷ Static methods1,90629.92%
▷ Public methods4,73674.34%
▷ Protected methods3866.06%
▷ Private methods1,24919.60%
Functions174
▷ Named functions10761.49%
▷ Anonymous functions6738.51%
Constants1,601
▷ Global constants16210.12%
▷ Class constants1,43989.88%
▷ Public constants1,27688.67%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.08MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
libraries/freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%
admin/img/tablepress-editor-button.png4.53KB0.97KB▼ 78.60%
admin/img/tablepress.png3.51KB3.66KB0.00%
libraries/freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
admin/img/default-style-customizer.png44.86KB46.61KB0.00%