84% table-sorter

Code Review | Table Sorter

WordPress plugin Table Sorter scored84%from 54 tests.

About plugin

  • Plugin page: table-sorter
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2
  • WordPress version: 6.3.1
  • First release: Nov 19, 2014
  • Latest release: Apr 13, 2023
  • Number of updates: 33
  • Update frequency: every 93.0 days
  • Top authors: farhan.noor (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

8,000+ active /40,040 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.66ms] Passed 4 tests

An overview of server-side resources used by Table Sorter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.80 ▼6.49
Dashboard /wp-admin3.33 ▲0.0253.92 ▼2.29
Posts /wp-admin/edit.php3.38 ▲0.0254.19 ▼1.51
Add New Post /wp-admin/post-new.php5.91 ▲0.0291.00 ▼16.36
Media Library /wp-admin/upload.php3.25 ▲0.0239.82 ▲2.32
Table Sorter /wp-admin/options-general.php?page=table-sorter3.2233.84

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Table Sorter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲11913.48 ▼0.889.69 ▲7.4238.58 ▼9.86
Dashboard /wp-admin2,202 ▲225.48 ▼0.1385.59 ▼3.8837.04 ▼1.84
Posts /wp-admin/edit.php2,107 ▲71.97 ▲0.0040.31 ▲4.1339.26 ▲1.85
Add New Post /wp-admin/post-new.php1,531 ▲323.11 ▼0.07660.26 ▼104.1052.22 ▼2.45
Media Library /wp-admin/upload.php1,407 ▲74.34 ▲0.1897.00 ▼2.7747.25 ▼0.65
Table Sorter /wp-admin/options-general.php?page=table-sorter9042.1625.1030.74

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% 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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/table-sorter/table-sorter.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === table-sorter === )
Please take inspiration from this readme.txt

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

The principal PHP file in "Table Sorter" v. 2.3 is loaded by WordPress automatically on each request
92 characters long description:
This plugin makes your standard HTML tables sortable. For more details, check plugin's docs.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin878 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript5150251764
PHP17982
Ant15318
CSS14014

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin