84% wp-category-order

Code Review | WP Category Order

WordPress plugin WP Category Order scored84%from 54 tests.

About plugin

  • Plugin page: wp-category-order
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2.1
  • WordPress version: 6.3.1
  • First release: Aug 17, 2016
  • Latest release: Jun 4, 2019
  • Number of updates: 11
  • Update frequency: every 93.2 days
  • Top authors: ymonica32 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

600+ active /7,866 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.77ms] Passed 4 tests

Server-side resources used by WP Category Order
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.94 ▲0.2140.62 ▼4.44
Dashboard /wp-admin3.58 ▲0.0253.23 ▲3.58
Posts /wp-admin/edit.php3.69 ▲0.0150.60 ▼5.38
Add New Post /wp-admin/post-new.php6.16 ▲0.0192.02 ▼9.69
Media Library /wp-admin/upload.php3.50 ▲0.0133.95 ▼3.55

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by WP Category Order
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.26 ▼0.031.71 ▼0.1044.25 ▼2.24
Dashboard /wp-admin2,195 ▲185.69 ▲0.0199.14 ▲1.7650.05 ▲9.58
Posts /wp-admin/edit.php2,100 ▼32.03 ▲0.0242.28 ▼1.7938.77 ▼0.94
Add New Post /wp-admin/post-new.php1,540 ▲1423.26 ▲5.56609.52 ▼87.5355.57 ▲3.76
Media Library /wp-admin/upload.php1,397 ▼04.24 ▲0.1198.10 ▼6.2944.92 ▼2.20

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means 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
  • 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/wp-category-order/WPCategoryOrder.php:17

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)
Everything seems fine on the user side

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
10 plugin tags: parent and child categories, taxonomy order, category list, wordpress taxonomy, taxonomy...

wp-category-order/WPCategoryOrder.php 92% from 13 tests

The main PHP script in "WP Category Order" version 2.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-category-order.php" instead of "WPCategoryOrder.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 plugin23 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1102423

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin