83% wp-sort-posts

Code Review | WP Sort Posts

WordPress plugin WP Sort Posts scored83%from 54 tests.

About plugin

  • Plugin page: wp-sort-posts
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-3.5.2
  • WordPress version: 6.3.1
  • First release: Jun 25, 2013
  • Latest release: Jun 25, 2013
  • Number of updates: 7
  • Update frequency: N/A
  • Top authors: TrueFalse (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

50+ active /3,357 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.58MB] [CPU: ▼30.01ms] Passed 4 tests

This is a short check of server-side resources used by WP Sort Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.6915.99 ▼25.18
Dashboard /wp-admin3.20 ▼0.1034.21 ▼17.40
Posts /wp-admin/edit.php3.13 ▼0.2329.67 ▼18.91
Add New Post /wp-admin/post-new.php4.60 ▼1.2944.54 ▼58.54
Media Library /wp-admin/upload.php3.23 ▲0.0036.59 ▼0.74

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for WP Sort Posts
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.61 ▼0.691.81 ▼0.1943.63 ▼1.66
Dashboard /wp-admin2,209 ▲214.85 ▼1.03107.16 ▼8.5441.00 ▼6.16
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0239.46 ▲2.2236.41 ▲3.16
Add New Post /wp-admin/post-new.php1,542 ▲2818.52 ▲1.01593.05 ▼87.0662.26 ▲6.49
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0097.38 ▼5.3841.45 ▼6.42

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/wp-sort-posts/wp-sort-posts.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 90% 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
Attributes that need to be fixed:
  • Screenshots: Screenshot #1 (On the home page.) image required
The official readme.txt might help

wp-sort-posts/wp-sort-posts.php 85% from 13 tests

Analyzing the main PHP file in "WP Sort Posts" version 1.0
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: The plugin description must be longer than 10 characters (currently 0 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin89 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP151559
PO File191130

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.17
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 compressed PNG file occupies 0.06MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png60.05KB59.18KB▼ 1.45%