89% lh-sortable-tables

Code Review | LH Sortable Tables

WordPress plugin LH Sortable Tables scored89%from 54 tests.

About plugin

  • Plugin page: lh-sortable-tables
  • Plugin version: 1.01
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 6, 2020
  • Latest release: Jul 31, 2022
  • Number of updates: 9
  • Update frequency: every 73.7 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /706 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by LH Sortable Tables
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.20 ▼7.05
Dashboard /wp-admin3.32 ▲0.0243.62 ▼1.93
Posts /wp-admin/edit.php3.37 ▲0.0246.09 ▼5.22
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.14 ▼12.32
Media Library /wp-admin/upload.php3.25 ▲0.0233.40 ▼1.40

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

LH Sortable Tables: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.70 ▼0.671.69 ▼0.3140.00 ▼6.89
Dashboard /wp-admin2,203 ▲155.83 ▲0.97103.39 ▲2.1341.80 ▼1.94
Posts /wp-admin/edit.php2,089 ▼02.02 ▲0.0140.06 ▼5.5435.92 ▲0.39
Add New Post /wp-admin/post-new.php1,514 ▼2817.77 ▼0.57651.76 ▲31.8149.04 ▼1.58
Media Library /wp-admin/upload.php1,391 ▼04.21 ▼0.06100.58 ▲2.7941.00 ▼1.21

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

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 93% from 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
5 plugin tags: table, sortable, order, sorter, tablesorter

lh-sortable-tables/lh-sortable-tables.php 85% from 13 tests

Analyzing the main PHP file in "LH Sortable Tables" version 1.01
Please make the necessary changes and fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected324 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP321228172
JavaScript1247594
CSS113058

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.65
Average class complexity20.50
▷ Minimum class complexity9.00
▷ Maximum class complexity32.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods538.46%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
PNG images were not found in this plugin