68% custom-post-order-category

Code Review | Custom Category/Post Type Post order

WordPress plugin Custom Category/Post Type Post order scored68%from 54 tests.

About plugin

  • Plugin page: custom-post-order...
  • Plugin version: 1.5.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.8.2
  • WordPress version: 6.3.1
  • First release: Jul 4, 2012
  • Latest release: Dec 19, 2021
  • Number of updates: 46
  • Update frequency: every 75.1 days
  • Top authors: faaiq (100%)

Code review

54 tests

User reviews

19 reviews

Install metrics

900+ active /33,394 total downloads

Benchmarks

Plugin footprint 65% 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.67MB] [CPU: ▼11.82ms] Passed 4 tests

An overview of server-side resources used by Custom Category/Post Type Post order
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.97 ▲0.13
Dashboard /wp-admin3.33 ▲0.0345.83 ▲4.44
Posts /wp-admin/edit.php3.38 ▲0.0249.41 ▲4.23
Add New Post /wp-admin/post-new.php3.12 ▼2.7734.58 ▼50.32
Media Library /wp-admin/upload.php3.25 ▲0.0234.21 ▼1.32
Permission /wp-admin/admin.php?page=subccpo3.1930.65
Post Order /wp-admin/admin.php?page=ccpo3.1932.47

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: 1 new table, 8 new options
New tables
wp_ccpo_post_order_rel
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
category_children
db_upgraded
ccpo_db_version
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Custom Category/Post Type Post order
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,939 ▲20413.75 ▼0.609.14 ▲6.7937.26 ▼0.53
Dashboard /wp-admin2,227 ▲395.87 ▲0.98102.37 ▼15.2137.10 ▼6.51
Posts /wp-admin/edit.php2,114 ▲222.08 ▲0.0238.61 ▼2.8636.62 ▼1.92
Add New Post /wp-admin/post-new.php6,225 ▲4,69726.38 ▲8.02900.86 ▲267.6836.99 ▼19.12
Media Library /wp-admin/upload.php1,412 ▲274.17 ▼0.0294.87 ▼7.7842.62 ▼2.48
Permission /wp-admin/admin.php?page=subccpo8501.8026.0624.21
Post Order /wp-admin/admin.php?page=ccpo8791.8429.1230.06

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
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_ccpo_post_order_rel
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • category_children
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/admin.php?page=subccpo
    • > Notice in wp-content/plugins/custom-post-order-category/wp-customcategorypostorder.php+60
    Undefined index: role
    • > GET request to /wp-admin/admin.php?page=ccpo
    • > Notice in wp-content/plugins/custom-post-order-category/wp-customcategorypostorder.php+122
    Undefined index: category
    • > GET request to /wp-admin/admin.php?page=ccpo
    • > Notice in wp-content/plugins/custom-post-order-category/wp-customcategorypostorder.php+240
    Undefined variable: order_result

SRP 50% 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
The following issues need your attention
  • 1× 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/custom-post-order-category/wp-customcategorypostorder.php:19

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: custom post order, custom post order by custom post type, drag drop interface of ordering posts by category or post type, post order, custom post order by category

custom-post-order-category/wp-customcategorypostorder.php 92% from 13 tests

"Custom Category/Post Type Post order" version 1.5.9's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("custom-post-order-category.php" instead of "wp-customcategorypostorder.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin465 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP114220465

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity55.00
▷ Minimum class complexity55.00
▷ Maximum class complexity55.00
Average method complexity4.00
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin