89% categories-in-hierarchical-order

Code Review | Categories in Hierarchical Order

WordPress plugin Categories in Hierarchical Order scored 89% from 54 tests.

About plugin

  • Plugin page: categories-in-hie...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.6
  • WordPress version: 6.3.1
  • First release: Jun 13, 2014
  • Latest release: Dec 10, 2020
  • Number of updates: 31
  • Update frequency: every 76.5 days
  • Top authors: amitaits (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

3,000+ active / 22,315 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Categories in Hierarchical Order
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.91 ▼5.65
Dashboard /wp-admin3.31 ▲0.0144.33 ▼8.02
Posts /wp-admin/edit.php3.36 ▲0.0142.71 ▼3.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.50 ▼7.46
Media Library /wp-admin/upload.php3.23 ▲0.0032.67 ▼2.80

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Categories in Hierarchical Order
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.60 ▼1.022.12 ▲0.1140.31 ▼6.00
Dashboard /wp-admin2,200 ▲125.83 ▲0.9394.58 ▼29.4236.95 ▼11.98
Posts /wp-admin/edit.php2,089 ▼02.03 ▼0.0332.76 ▼1.8733.64 ▼1.86
Add New Post /wp-admin/post-new.php1,534 ▼823.43 ▲0.51654.68 ▲9.9652.91 ▼2.28
Media Library /wp-admin/upload.php1,391 ▲64.33 ▲0.13103.33 ▼0.9545.01 ▲0.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots require images: #1 (WordPress default category order), #2 (Category hierarchy maintained by the plugin)
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

categories-in-hierarchical-order/settings.php 92% from 13 tests

The entry point to "Categories in Hierarchical Order" version 1.3.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("categories-in-hierarchical-order.php" instead of "settings.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin21 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1101117
Markdown1304

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity2.00
▷ Minimum method complexity2.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png6.46KB4.41KB▼ 31.71%
screenshot-1.png6.43KB4.37KB▼ 32.00%