78% table-layout

Code Review | Responsive Table Layout

WordPress plugin Responsive Table Layout scored78%from 54 tests.

About plugin

  • Plugin page: table-layout
  • Plugin version: 1.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 3, 2016
  • Latest release: Nov 25, 2017
  • Number of updates: 163
  • Update frequency: every 4.1 days
  • Top authors: MaartenM (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

400+ active /10,741 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.12MB] [CPU: ▼5.63ms] Passed 4 tests

Analyzing server-side resources used by Responsive Table Layout
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0546.53 ▼4.10
Dashboard /wp-admin3.45 ▲0.1552.52 ▼0.67
Posts /wp-admin/edit.php3.50 ▲0.1552.29 ▲4.50
Add New Post /wp-admin/post-new.php6.09 ▲0.2185.81 ▼15.71
Media Library /wp-admin/upload.php3.38 ▲0.1537.78 ▼2.04
Table Layout Updater /wp-admin/admin.php?page=mmtl_updater3.3433.56

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 94 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
mmtl_version
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Responsive Table Layout
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.17 ▼0.171.84 ▼0.1942.71 ▼2.81
Dashboard /wp-admin2,192 ▲155.54 ▼0.0988.44 ▼2.9941.31 ▲2.16
Posts /wp-admin/edit.php2,103 ▲31.99 ▲0.0139.56 ▲2.5235.54 ▼3.81
Add New Post /wp-admin/post-new.php1,621 ▲9518.53 ▼4.89636.03 ▼45.5452.68 ▼7.88
Media Library /wp-admin/upload.php1,403 ▲94.16 ▼0.0399.88 ▼1.6645.62 ▲1.62
Table Layout Updater /wp-admin/admin.php?page=mmtl_updater7732.0223.9425.57

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-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/table-layout/templates/modal.php
  • 11× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/table-layout/includes/shortcodes/text.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/table-layout/includes/shortcodes/column.php:24
    • > PHP Notice
      Undefined variable: components in wp-content/plugins/table-layout/templates/component-picklist.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/table-layout/includes/shortcodes/heading.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/table-layout/templates/component-picklist.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/table-layout/includes/shortcodes/row.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/table-layout/includes/shortcodes/icon.php:101
    • > PHP Warning
      count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/table-layout/templates/component-picklist.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/table-layout/includes/shortcodes/button.php:24
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/table-layout/templates/modal.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (editor), #2 (layout settings), #3 (background settings), #4 (general settings), #5 (content settings), #6 (responiveness settings), #7 (front large screen), #8 (front small screen)
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
You can take inspiration from this readme.txt

table-layout/table-layout.php Passed 13 tests

This is the main PHP file of "Responsive Table Layout" version 1.5.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
84 characters long description:
Provides an easy- and user friendly way to make your site's content more responsive.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected17,291 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
SVG8096,311
CSS191,4072985,324
PHP19880603,168
JavaScript87622492,197
PO File1132234291

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity15.94
▷ Minimum class complexity1.00
▷ Maximum class complexity39.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods169
▷ Static methods4928.99%
▷ Public methods169100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 1.00MB with 0.68MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-6.png72.72KB24.72KB▼ 66.01%
screenshot-2.png24.36KB8.39KB▼ 65.54%
screenshot-8.png277.41KB79.34KB▼ 71.40%
screenshot-7.png343.60KB106.89KB▼ 68.89%
screenshot-1.png196.33KB64.03KB▼ 67.39%