100% post-hierarchy

Code Review | Post Hierarchy

WordPress plugin Post Hierarchy scored 100% from 54 tests.

About plugin

  • Plugin page: post-hierarchy
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.6
  • WordPress version: 5.8.1
  • First release: Jan 27, 2021
  • Latest release: Jan 27, 2021
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: codelab7 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 155 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼124.45ms] Passed 4 tests

Analyzing server-side resources used by Post Hierarchy
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.92 ▲0.2078.81 ▲53.55
Dashboard /wp-admin3.13 ▲0.0771.97 ▲22.37
Posts /wp-admin/edit.php3.22 ▲0.1162.01 ▲15.15
Add New Post /wp-admin/post-new.php5.49 ▲0.06138.67 ▼533.39
Media Library /wp-admin/upload.php3.04 ▲0.0434.17 ▼1.92

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 17 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Post Hierarchy: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10715.89 ▲0.3511.17 ▼0.0749.33 ▲1.65
Dashboard /wp-admin2,992 ▲615.97 ▲0.07146.31 ▼19.38110.90 ▼16.12
Posts /wp-admin/edit.php2,822 ▲832.72 ▲0.0073.27 ▲2.1389.87 ▲4.88
Add New Post /wp-admin/post-new.php1,690 ▲717.62 ▼0.77442.98 ▲28.35109.38 ▼6.31
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.00169.73 ▼33.24111.60 ▼7.18

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 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)
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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: post capabilities, posts, hierarchy

post-hierarchy/post-hierarchy.php Passed 13 tests

"Post Hierarchy" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
49 characters long description:
Set Post as a sub-post of other posts Like a Page

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected249 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP1060108224
JSON10015
Markdown15010

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity3.29
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1356.52%
▷ Protected methods417.39%
▷ Private methods626.09%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants1
▷ Global constants1100.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
There were not PNG files found in your plugin