84% sortable-posts

Code Review | Sortable Posts

WordPress plugin Sortable Posts scored84%from 54 tests.

About plugin

  • Plugin page: sortable-posts
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4.2
  • WordPress version: 6.3.1
  • First release: Feb 15, 2016
  • Latest release: Mar 22, 2016
  • Number of updates: 33
  • Update frequency: every 4.1 days
  • Top authors: CarlosRios (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /2,035 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.10MB] [CPU: ▼5.58ms] Passed 4 tests

A check of server-side resources used by Sortable Posts
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0835.16 ▼9.09
Dashboard /wp-admin3.41 ▲0.1047.08 ▼2.68
Posts /wp-admin/edit.php3.52 ▲0.1648.61 ▼0.92
Add New Post /wp-admin/post-new.php6.01 ▲0.1283.20 ▼9.62
Media Library /wp-admin/upload.php3.33 ▲0.1038.19 ▲3.04
Sortable Posts /wp-admin/options-general.php?page=sortable_posts_settings3.3032.45

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Sortable Posts
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲7513.27 ▼1.111.74 ▼0.3238.55 ▼4.46
Dashboard /wp-admin2,227 ▲394.88 ▼0.03105.36 ▲5.5738.86 ▼5.64
Posts /wp-admin/edit.php2,114 ▲222.29 ▲0.2541.56 ▲5.0234.59 ▲1.51
Add New Post /wp-admin/post-new.php1,534 ▲117.36 ▼5.46675.78 ▲14.1758.80 ▲5.11
Media Library /wp-admin/upload.php1,412 ▲274.30 ▲0.1199.58 ▲1.0140.37 ▼0.78
Sortable Posts /wp-admin/options-general.php?page=sortable_posts_settings8881.9325.6228.70

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
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • 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)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sortable-posts/includes/class-sp-api.php:238
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/sortable-posts/includes/class-sp-settings.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/sortable-posts/includes/class-sp-taxonomies.php:34

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 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt is a good inspiration

sortable-posts/sortable-posts.php Passed 13 tests

The main file in "Sortable Posts" v. 1.1.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
121 characters long description:
Sortable Posts is a small plugin for WordPress that adds sortability to the post edit screen of any post type you choose.

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
No dangerous file extensions were detected711 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP4164398489
CSS14386
Markdown118073
JavaScript1181163

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.50
▷ Minimum class complexity8.00
▷ Maximum class complexity20.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods37
▷ Static methods410.81%
▷ Public methods3491.89%
▷ Protected methods38.11%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin