10% wp-posts-re-order

Code Review | WP Posts Re-order

WordPress plugin WP Posts Re-order scored10%from 54 tests.

About plugin

  • Plugin page: wp-posts-re-order
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 25, 2014
  • Latest release: Sep 21, 2014
  • Number of updates: 20
  • Update frequency: every 2.9 days
  • Top authors: suifengtec (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /6,458 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wp-posts-re-order/wp-posts-re-order.php+337
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_P_R_O has a deprecated constructor

Server metrics [RAM: ▼1.75MB] [CPU: ▼59.74ms] Passed 4 tests

Server-side resources used by WP Posts Re-order
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.24 ▼1.235.25 ▼38.23
Dashboard /wp-admin2.26 ▼1.056.69 ▼58.24
Posts /wp-admin/edit.php2.26 ▼1.106.83 ▼42.24
Add New Post /wp-admin/post-new.php2.26 ▼3.635.77 ▼100.26
Media Library /wp-admin/upload.php2.26 ▼0.976.63 ▼30.45
Re-Order /wp-admin/edit.php?post_type=wp_template_part&page=wp-posts-re-order-wp_template_part2.267.03
Re-Order /wp-admin/edit.php?post_type=oembed_cache&page=wp-posts-re-order-oembed_cache2.267.87
Posts Re-order /wp-admin/options-general.php?page=wppro-options2.266.21
Re-Order /wp-admin/edit.php?post_type=customize_changeset&page=wp-posts-re-order-customize_changeset2.268.30
Re-Order /wp-admin/edit.php?post_type=wp_global_styles&page=wp-posts-re-order-wp_global_styles2.267.03
Re-Order /wp-admin/edit.php?page=wp-posts-re-order-post2.266.81
Re-Order /wp-admin/edit.php?post_type=nav_menu_item&page=wp-posts-re-order-nav_menu_item2.266.58
Re-Order /wp-admin/edit.php?post_type=wp_navigation&page=wp-posts-re-order-wp_navigation2.266.71
Re-Order /wp-admin/edit.php?post_type=wp_block&page=wp-posts-re-order-wp_block2.266.37
Re-Order /wp-admin/edit.php?post_type=user_request&page=wp-posts-re-order-user_request2.266.87

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_recent-comments
wppro_options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by WP Posts Re-order
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7413.21 ▼1.045.06 ▲3.0043.91 ▼0.97
Dashboard /wp-admin2,229 ▲445.86 ▼0.08115.26 ▲6.1748.94 ▲2.03
Posts /wp-admin/edit.php2,106 ▲172.06 ▲0.0735.73 ▼2.4734.38 ▼0.14
Add New Post /wp-admin/post-new.php1,546 ▲1623.08 ▲5.03673.71 ▲18.8462.22 ▲9.08
Media Library /wp-admin/upload.php1,402 ▲144.26 ▲0.09100.47 ▼8.6244.69 ▼5.44
Re-Order /wp-admin/edit.php?post_type=wp_template_part&page=wp-posts-re-order-wp_template_part7971.7027.0326.89
Re-Order /wp-admin/edit.php?post_type=oembed_cache&page=wp-posts-re-order-oembed_cache7971.8227.9029.75
Posts Re-order /wp-admin/options-general.php?page=wppro-options9272.1723.1725.10
Re-Order /wp-admin/edit.php?post_type=customize_changeset&page=wp-posts-re-order-customize_changeset7941.7025.2927.16
Re-Order /wp-admin/edit.php?post_type=wp_global_styles&page=wp-posts-re-order-wp_global_styles7941.7025.8027.79
Re-Order /wp-admin/edit.php?page=wp-posts-re-order-post7951.7026.1330.98
Re-Order /wp-admin/edit.php?post_type=nav_menu_item&page=wp-posts-re-order-nav_menu_item7941.7026.2326.91
Re-Order /wp-admin/edit.php?post_type=wp_navigation&page=wp-posts-re-order-wp_navigation7941.7126.1528.01
Re-Order /wp-admin/edit.php?post_type=wp_block&page=wp-posts-re-order-wp_block7971.7126.8828.66
Re-Order /wp-admin/edit.php?post_type=user_request&page=wp-posts-re-order-user_request7931.7426.8227.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/wp-posts-re-order/wp-posts-re-order.php+337
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_P_R_O has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Almost there, just fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=user_request&page=wp-posts-re-order-user_request
    • > Deprecated in wp-content/plugins/wp-posts-re-order/wp-posts-re-order.php+337
    Methods with the same name as their class will not be constructors in a future version of PHP; WP_P_R_O has a deprecated constructor
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=user_request&page=wp-posts-re-order-user_request
    • > Notice in wp-content/plugins/wp-posts-re-order/wp-posts-re-order.php+426
    Trying to get property 'labels' of non-object
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=user_request&page=wp-posts-re-order-user_request
    • > Notice in wp-content/plugins/wp-posts-re-order/wp-posts-re-order.php+426
    Trying to get property 'singular_name' of non-object
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=user_request&page=wp-posts-re-order-user_request
    • > Notice in wp-content/plugins/wp-posts-re-order/wp-posts-re-order.php+440
    Trying to get property 'name' of non-object

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 fix the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-posts-re-order/wp-posts-re-order.php:11

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
    • > GET request to /wp-admin/edit.php?post_type=wp_template_part&page=wp-posts-re-order-wp_template_part
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=wp_template_part&page=wp-posts-re-order-wp_template_part:168:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=user_request&page=wp-posts-re-order-user_request
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).sortable is not a function
    • > GET request to /wp-admin/edit.php?post_type=oembed_cache&page=wp-posts-re-order-oembed_cache
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=oembed_cache&page=wp-posts-re-order-oembed_cache:168:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=customize_changeset&page=wp-posts-re-order-customize_changeset
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=customize_changeset&page=wp-posts-re-order-customize_changeset:168:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=wp_global_styles&page=wp-posts-re-order-wp_global_styles
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=wp_global_styles&page=wp-posts-re-order-wp_global_styles:168:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?page=wp-posts-re-order-post
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?page=wp-posts-re-order-post:168:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=nav_menu_item&page=wp-posts-re-order-nav_menu_item
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=nav_menu_item&page=wp-posts-re-order-nav_menu_item:168:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=wp_navigation&page=wp-posts-re-order-wp_navigation
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=wp_navigation&page=wp-posts-re-order-wp_navigation:168:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=wp_block&page=wp-posts-re-order-wp_block
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=wp_block&page=wp-posts-re-order-wp_block:168:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/edit.php?post_type=user_request&page=wp-posts-re-order-user_request
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).sortable is not a function" "TypeError: jQuery(...).sortable is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=user_request&page=wp-posts-re-order-user_request:168:34)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
4 plugin tags: admin posts order, custom order, post order, post type order

wp-posts-re-order/wp-posts-re-order.php Passed 13 tests

This is the main PHP file of "WP Posts Re-order" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
33 characters long description:
Drag and Drop to sort your posts.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected715 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP112625516
PO File26074157
CSS17242

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity14.00
▷ Minimum class complexity2.00
▷ Maximum class complexity26.00
Average method complexity3.17
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods12100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions15100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected