78% metronet-reorder-posts

Code Review | Reorder Posts

WordPress plugin Reorder Posts scored78%from 54 tests.

About plugin

  • Plugin page: metronet-reorder-...
  • Plugin version: 2.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.2
  • WordPress version: 6.3.1
  • First release: May 9, 2012
  • Latest release: Mar 18, 2023
  • Number of updates: 97
  • Update frequency: every 40.9 days
  • Top authors: ronalfy (92.78%)ryanhellyer (6.19%)scottbasgaard (3.09%)

Code review

54 tests

User reviews

26 reviews

Install metrics

20,000+ active /275,793 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.33MB] [CPU: ▼4.00ms] Passed 4 tests

This is a short check of server-side resources used by Reorder Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.71 ▲0.2542.76 ▲4.82
Dashboard /wp-admin3.67 ▲0.3350.72 ▼7.01
Posts /wp-admin/edit.php3.78 ▲0.4343.73 ▼1.39
Add New Post /wp-admin/post-new.php6.25 ▲0.3781.11 ▼11.05
Media Library /wp-admin/upload.php3.59 ▲0.3636.95 ▲3.44
Reorder /wp-admin/edit.php?post_type=wp_template&page=reorder-wp_template3.5833.02
Reorder /wp-admin/edit.php?post_type=wp_block&page=reorder-wp_block3.5832.34
Reorder /wp-admin/edit.php?post_type=page&page=reorder-page3.5934.52
Reorder /wp-admin/edit.php?post_type=wp_template_part&page=reorder-wp_template_part3.5831.58
Reorder /wp-admin/edit.php?page=reorder-posts3.6035.47
Reorder /wp-admin/edit.php?post_type=nav_menu_item&page=reorder-nav_menu_item3.5833.92
Reorder /wp-admin/edit.php?post_type=oembed_cache&page=reorder-oembed_cache3.5832.64
Reorder /wp-admin/edit.php?post_type=custom_css&page=reorder-custom_css3.5833.67
Reorder /wp-admin/edit.php?post_type=attachment&page=reorder-attachment3.5832.66
Reorder /wp-admin/edit.php?post_type=wp_global_styles&page=reorder-wp_global_styles3.5832.48

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
metronet-reorder-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Reorder Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5514.73 ▲0.551.73 ▲0.0747.63 ▲7.86
Dashboard /wp-admin2,210 ▲295.64 ▼0.0790.98 ▼8.9741.76 ▲2.74
Posts /wp-admin/edit.php2,112 ▲121.99 ▼0.0233.74 ▼3.0939.74 ▲5.80
Add New Post /wp-admin/post-new.php1,535 ▲423.03 ▼0.40660.91 ▲12.3952.76 ▼5.72
Media Library /wp-admin/upload.php1,412 ▲94.20 ▼0.0296.90 ▲0.1643.74 ▲0.35
Reorder /wp-admin/edit.php?post_type=wp_template&page=reorder-wp_template8721.8427.5028.17
Reorder /wp-admin/edit.php?post_type=wp_block&page=reorder-wp_block8781.8524.7725.52
Reorder /wp-admin/edit.php?post_type=page&page=reorder-page8962.0433.1633.05
Reorder /wp-admin/edit.php?post_type=wp_template_part&page=reorder-wp_template_part8721.8125.0125.60
Reorder /wp-admin/edit.php?page=reorder-posts8902.0330.3830.93
Reorder /wp-admin/edit.php?post_type=nav_menu_item&page=reorder-nav_menu_item8721.8326.6129.98
Reorder /wp-admin/edit.php?post_type=oembed_cache&page=reorder-oembed_cache8721.8424.9828.35
Reorder /wp-admin/edit.php?post_type=custom_css&page=reorder-custom_css8751.8726.7728.68
Reorder /wp-admin/edit.php?post_type=attachment&page=reorder-attachment8721.9024.2529.54
Reorder /wp-admin/edit.php?post_type=wp_global_styles&page=reorder-wp_global_styles8751.8227.2227.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 50% 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)
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/metronet-reorder-posts/index.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/metronet-reorder-posts/class-reorder-admin.php:449

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: reorder posts, reorder

metronet-reorder-posts/index.php 92% from 13 tests

The main file in "Reorder Posts" v. 2.5.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("metronet-reorder-posts.php" instead of "index.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected1,707 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3190143913
PHP4131456624
CSS12090
PO File1242480

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity61.50
▷ Minimum class complexity56.00
▷ Maximum class complexity67.00
Average method complexity5.17
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes150.00%
Methods29
▷ Static methods13.45%
▷ Public methods2793.10%
▷ Protected methods00.00%
▷ Private methods26.90%
Functions3
▷ Named functions3100.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
PNG images were not found in this plugin