93% page-menu-ancestor-tree

Code Review | Parent Page Menu

WordPress plugin Parent Page Menu scored 93% from 54 tests.

About plugin

  • Plugin page: page-menu-ancesto...
  • Plugin version: 0.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4.2
  • WordPress version: 5.8.1
  • First release: Jul 14, 2020
  • Latest release: Jul 14, 2020
  • Number of updates: 7
  • Update frequency: every 86.4 days
  • Top authors: insightdes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 487 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Parent Page Menu
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.0138.58 ▲2.08
Dashboard /wp-admin3.07 ▲0.0149.68 ▲1.98
Posts /wp-admin/edit.php3.12 ▲0.0146.46 ▲8.73
Add New Post /wp-admin/post-new.php5.43 ▼0.0196.04 ▼675.25
Media Library /wp-admin/upload.php3.01 ▲0.0140.78 ▲4.45

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Parent Page Menu: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.25 ▲0.589.12 ▼0.3947.18 ▼1.39
Dashboard /wp-admin2,970 ▲365.94 ▼0.00144.50 ▼10.10108.41 ▼14.43
Posts /wp-admin/edit.php2,739 ▼02.84 ▲0.1274.58 ▲6.3086.57 ▼3.14
Add New Post /wp-admin/post-new.php1,581 ▼10217.99 ▼0.81416.10 ▲16.14128.56 ▲21.34
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.03168.55 ▼0.04121.31 ▲6.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/page-menu-ancestor-tree/parentPageMenu.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Invalid URI found ("")
  • Screenshots: Add an image for screenshot #1 (screenshot)
The official readme.txt might help

page-menu-ancestor-tree/parentPageMenu.php 85% from 13 tests

Analyzing the main PHP file in "Parent Page Menu" version 0.1
It is important to fix the following:
  • Version: The plugin version was not found
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("page-menu-ancestor-tree.php" instead of "parentPageMenu.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin118 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1304160
CSS11458

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.83
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.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
2 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
parentPageMenubg.png4.13KB0.08KB▼ 97.95%
assets/screenshot.png49.83KB13.99KB▼ 71.92%