89% get-subpages-list

Code Review | Child Pages Block

WordPress plugin Child Pages Block scored89%from 54 tests.

About plugin

  • Plugin page: get-subpages-list
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.5
  • WordPress version: 6.3.1
  • First release: Sep 5, 2019
  • Latest release: Aug 24, 2020
  • Number of updates: 4
  • Update frequency: every 89.0 days
  • Top authors: umang7 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

100+ active /9,060 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 gracefully, with no errors

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

A check of server-side resources used by Child Pages Block
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0247.64 ▲1.97
Dashboard /wp-admin3.32 ▲0.0148.80 ▼5.28
Posts /wp-admin/edit.php3.38 ▲0.0255.12 ▲4.30
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.75 ▼24.88
Media Library /wp-admin/upload.php3.24 ▲0.0240.20 ▲2.80

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Child Pages Block
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,084 ▲32324.05 ▲9.4747.24 ▲45.4746.74 ▲3.39
Dashboard /wp-admin2,292 ▲8610.83 ▲5.93118.77 ▲8.3540.52 ▼8.16
Posts /wp-admin/edit.php2,154 ▲549.45 ▲7.4081.63 ▲45.4334.36 ▼2.36
Add New Post /wp-admin/post-new.php6,350 ▲4,80026.96 ▲3.74751.62 ▲48.5438.51 ▼19.42
Media Library /wp-admin/upload.php1,498 ▲9812.13 ▲7.89130.29 ▲20.1456.00 ▲9.05

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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)
The smoke test was a success, however most plugin functionality was not tested

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

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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
  • Requires php: Version format is invalid
The official readme.txt is a good inspiration

get-subpages-list/gutenberg-block-subpages-list.php 92% from 13 tests

The primary PHP file in "Child Pages Block" version 1.0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("get-subpages-list.php" instead of "gutenberg-block-subpages-list.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected203 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript11329131
PHP1101666
CSS1006

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
There were not PNG files found in your plugin