84% simple-posts-order

Code Review | Simple Posts Order

WordPress plugin Simple Posts Order scored 84% from 54 tests.

About plugin

  • Plugin page: simple-posts-order
  • Plugin version: 1.16
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.8
  • WordPress version: 5.8.1
  • First release: Jul 21, 2016
  • Latest release: Nov 4, 2021
  • Number of updates: 51
  • Update frequency: every 37.9 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,387 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.13MB] [CPU: ▼149.26ms] Passed 4 tests

A check of server-side resources used by Simple Posts Order
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.96 ▲0.1333.83 ▲2.31
Dashboard /wp-admin3.19 ▲0.1437.61 ▼9.02
Posts /wp-admin/edit.php3.24 ▲0.1344.82 ▲3.79
Add New Post /wp-admin/post-new.php5.55 ▲0.1287.70 ▼581.65
Media Library /wp-admin/upload.php3.13 ▲0.1231.41 ▼8.66
Simple Posts Order /wp-admin/options-general.php?page=SimplePostsOrder3.1028.31

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 2 new options
New WordPress options
widget_simplepostsorderwidgetitem
simple_posts_order

Browser metrics Passed 4 tests

Checking browser requirements for Simple Posts Order
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.93 ▲0.148.39 ▼2.8046.05 ▼1.26
Dashboard /wp-admin2,978 ▲445.94 ▼0.04134.53 ▼11.89112.41 ▲3.56
Posts /wp-admin/edit.php2,744 ▲52.70 ▼0.0162.78 ▲0.2995.07 ▼5.73
Add New Post /wp-admin/post-new.php1,503 ▼16918.54 ▼0.32378.66 ▼2.41111.41 ▼1.42
Media Library /wp-admin/upload.php1,815 ▲85.02 ▼0.02153.78 ▼0.56108.31 ▼8.13
Simple Posts Order /wp-admin/options-general.php?page=SimplePostsOrder1,4662.0861.2482.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • widget_simplepostsorderwidgetitem

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-posts-order/lib/class-simplepostsorder.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-posts-order/lib/class-simplepostsorderadmin.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-posts-order/lib/class-simplepostsorderwidgetitem.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-posts-order/lib/class-simplepostsorderadmin.php:37

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: widget, post, shortcode, posts, order...

simple-posts-order/simplepostsorder.php 92% from 13 tests

The principal PHP file in "Simple Posts Order" v. 1.16 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("simple-posts-order.php" instead of "simplepostsorder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin669 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP5113204669

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity35.33
▷ Minimum class complexity4.00
▷ Maximum class complexity60.00
Average method complexity7.44
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1487.50%
▷ Protected methods00.00%
▷ Private methods212.50%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
No PNG files were detected