83% sort-any-table

Code Review | Sort ANY Table

WordPress plugin Sort ANY Table scored83%from 54 tests.

About plugin

  • Plugin page: sort-any-table
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.9.8
  • WordPress version: 6.3.1
  • First release: Mar 13, 2017
  • Latest release: Aug 15, 2018
  • Number of updates: 11
  • Update frequency: every 46.8 days
  • Top authors: buntegiraffe (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /2,210 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼2.89ms] Passed 4 tests

Server-side resources used by Sort ANY Table
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1038.41 ▼4.27
Dashboard /wp-admin3.39 ▲0.0947.99 ▲0.28
Posts /wp-admin/edit.php3.50 ▲0.1550.86 ▲4.10
Add New Post /wp-admin/post-new.php5.97 ▲0.0986.22 ▼7.69
Media Library /wp-admin/upload.php3.31 ▲0.0837.41 ▲0.13
Sort Any Table /wp-admin/tools.php?page=bg_sort_table3.2832.79

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Sort ANY Table: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,927 ▲19214.05 ▼0.5112.98 ▲11.0547.61 ▲3.45
Dashboard /wp-admin2,215 ▲234.87 ▼0.09112.23 ▲4.6240.76 ▲1.10
Posts /wp-admin/edit.php2,095 ▲61.99 ▼0.0240.16 ▲4.6035.06 ▲1.84
Add New Post /wp-admin/post-new.php1,533 ▲1422.85 ▼0.28655.94 ▼37.9958.27 ▼0.66
Media Library /wp-admin/upload.php1,397 ▲124.16 ▼0.05108.56 ▲5.2146.65 ▲0.97
Sort Any Table /wp-admin/tools.php?page=bg_sort_table8542.1326.3629.06

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/sort-any-table/ErrorLogging.php
    • > /wp-content/plugins/sort-any-table/bg_sort_table.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

sort-any-table/bg_sort_table.php 69% from 13 tests

The principal PHP file in "Sort ANY Table" v. 0.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Description: The description should be shorter than 140 characters (currently 147 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("sort-any-table.php" instead of "bg_sort_table.php")

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 plugin986 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP714553448
JavaScript61241318
CSS3129197
JSON12023

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity1.83
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.17
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes116.67%
▷ Concrete classes583.33%
▷ Final classes00.00%
Methods31
▷ Static methods13.23%
▷ Public methods2993.55%
▷ Protected methods00.00%
▷ Private methods26.45%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/tinymce-button.png2.34KB1.43KB▼ 39.14%
assets/img/add-sorting.png30.45KB12.54KB▼ 58.82%