94% parent-page-filter

Code Review | Parent Page Filter

WordPress plugin Parent Page Filter scored 94% from 54 tests.

About plugin

  • Plugin page: parent-page-filter
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.9.7
  • WordPress version: 5.9.2
  • First release: Nov 17, 2015
  • Latest release: Jul 10, 2018
  • Number of updates: 21
  • Update frequency: every 46.0 days
  • Top authors: stephane74 (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

1,000+ active / 9,809 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Server-side resources used by Parent Page Filter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0253.38 ▲2.71
Dashboard /wp-admin3.42 ▲0.0135.09 ▲1.88
Posts /wp-admin/edit.php3.65 ▲0.0135.26 ▼1.00
Add New Post /wp-admin/post-new.php6.89 ▼0.0893.62 ▼1,192.93
Media Library /wp-admin/upload.php3.30 ▲0.0123.89 ▲0.73

Server storage [IO: ▲0.00MB] [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: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Parent Page Filter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,797 ▲4315.91 ▲0.226.03 ▼0.532.94 ▲0.50
Dashboard /wp-admin2,894 ▲366.17 ▼0.13117.83 ▼16.46153.17 ▼11.71
Posts /wp-admin/edit.php2,690 ▼33.24 ▼0.0063.31 ▼1.11141.65 ▲0.13
Add New Post /wp-admin/post-new.php1,662 ▲116.58 ▲0.41413.68 ▼7.17160.24 ▲9.33
Media Library /wp-admin/upload.php1,698 ▼35.53 ▲0.05139.94 ▼3.37186.00 ▲0.27

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
This plugin's uninstaller ran successfully

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_post_type_hierarchical() in wp-content/plugins/parent-page-filter/custom-parent-page-filter.php:96

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === parent-page-filter === )
You can take inspiration from this readme.txt

parent-page-filter/custom-parent-page-filter.php 92% from 13 tests

The main PHP file in "Parent Page Filter" ver. 1.0.2 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("parent-page-filter.php" instead of "custom-parent-page-filter.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin110 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP121880
JavaScript118030

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.53
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity3.67
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
PNG images were not found in this plugin