89% wp-sort-order

Code Review | WP Sort Order

WordPress plugin WP Sort Order scored 89% from 54 tests.

About plugin

  • Plugin page: wp-sort-order
  • Plugin version: 1.3.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-6.2
  • WordPress version: 6.3.1
  • First release: Mar 1, 2016
  • Latest release: May 24, 2023
  • Number of updates: 46
  • Update frequency: every 57.4 days
  • Top authors: fahadmahmood (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

6,000+ active / 58,727 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.21MB] [CPU: ▲3.05ms] Passed 4 tests

Analyzing server-side resources used by WP Sort Order
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3850.91 ▲9.19
Dashboard /wp-admin3.50 ▲0.2054.93 ▲4.23
Posts /wp-admin/edit.php3.60 ▲0.2554.51 ▲2.13
Add New Post /wp-admin/post-new.php6.09 ▲0.2093.94 ▲3.08
Media Library /wp-admin/upload.php3.43 ▲0.2040.46 ▲2.74
WP Sort Order /wp-admin/options-general.php?page=wpso-settings3.4440.62

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 40 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
wpso_activation
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by WP Sort Order
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,916 ▲12713.60 ▼1.1810.16 ▲7.4143.39 ▼0.98
Dashboard /wp-admin2,216 ▲134.86 ▼0.94108.13 ▲9.6139.87 ▲1.19
Posts /wp-admin/edit.php2,096 ▲72.02 ▲0.0141.18 ▲5.5635.18 ▲2.54
Add New Post /wp-admin/post-new.php1,543 ▲123.51 ▲5.02668.32 ▲35.8063.05 ▼2.54
Media Library /wp-admin/upload.php1,395 ▲104.21 ▲0.0099.48 ▼6.7339.90 ▼3.83
WP Sort Order /wp-admin/options-general.php?page=wpso-settings1,58410.87302.9466.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • wpso_activation
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: taxonomy order, plugins order, user order, post order

wp-sort-order/index.php 85% from 13 tests

The main PHP file in "WP Sort Order" ver. 1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-sort-order.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected11,164 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
SVG3009,546
PHP43991351,089
CSS42715199
JavaScript54519186
PO File34848144

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.65
Average class complexity176.00
▷ Minimum class complexity176.00
▷ Maximum class complexity176.00
Average method complexity7.03
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods29
▷ Static methods00.00%
▷ Public methods29100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 0.03MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/menu-over.png0.61KB0.78KB0.00%
images/bamboo.png22.96KB8.49KB▼ 63.03%
images/check.png1.60KB1.45KB▼ 9.63%
images/menu.png0.59KB0.79KB0.00%
images/uncheck.png1.60KB1.46KB▼ 9.08%