84% hierarchy

Code Review | Hierarchy

WordPress plugin Hierarchy scored84%from 54 tests.

About plugin

  • Plugin page: hierarchy
  • Plugin version: 1.0.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.9.0
  • WordPress version: 6.3.1
  • First release: Jan 5, 2012
  • Latest release: Feb 10, 2022
  • Number of updates: 43
  • Update frequency: every 85.9 days
  • Top authors: jchristopher (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

200+ active /13,415 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.17MB] [CPU: ▼6.43ms] Passed 4 tests

This is a short check of server-side resources used by Hierarchy
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.31 ▼2.07
Dashboard /wp-admin3.59 ▲0.2548.64 ▼15.29
Posts /wp-admin/edit.php3.65 ▲0.2848.33 ▲5.21
Add New Post /wp-admin/post-new.php6.11 ▲0.2287.55 ▼10.99
Media Library /wp-admin/upload.php3.45 ▲0.2238.73 ▲2.65
Hierarchy /wp-admin/options-general.php?page=hierarchy-settings3.4337.51

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Hierarchy
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,841 ▲9513.25 ▼1.001.71 ▼0.1938.93 ▼4.80
Dashboard /wp-admin2,222 ▲404.84 ▼0.97114.05 ▲10.9242.74 ▲5.68
Posts /wp-admin/edit.php2,108 ▲192.04 ▲0.0235.82 ▼4.8030.63 ▼3.90
Add New Post /wp-admin/post-new.php1,546 ▲2723.27 ▼0.01680.68 ▲66.1061.00 ▲4.66
Media Library /wp-admin/upload.php1,401 ▲164.16 ▼0.1199.33 ▼4.0242.81 ▲0.10
Hierarchy /wp-admin/options-general.php?page=hierarchy-settings9622.0527.9436.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/hierarchy/includes/class-hierarchy-table-cpt.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/hierarchy/includes/class-hierarchy-table.php on line 4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/hierarchy/includes/class-hierarchy-table-cpt.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/hierarchy/includes/class-hierarchy-table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Hierarchy' not found in wp-content/plugins/hierarchy/includes/class-hierarchy-settings.php:3
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/hierarchy/includes/class-hierarchy-table.php on line 4
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/hierarchy/includes/class-hierarchy-table-cpt.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'Hierarchy' not found in wp-content/plugins/hierarchy/includes/class-hierarchy-factory.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/hierarchy/hierarchy.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 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
6 plugin tags: pages, routing, custom post types, cpt, hierarchy...

hierarchy/hierarchy.php Passed 13 tests

The entry point to "Hierarchy" version 1.0.5.1 is a PHP file that has certain tags in its header comment area
59 characters long description:
Properly structure your Pages, Posts, and Custom Post Types

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,385 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP93157761,178
PO File24858141
Markdown136066

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.42
Average class complexity31.00
▷ Minimum class complexity1.00
▷ Maximum class complexity57.00
Average method complexity3.09
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods86
▷ Static methods00.00%
▷ Public methods86100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin