84% list-pages-at-depth

Code Review | List Pages at Depth

WordPress plugin List Pages at Depth scored84%from 54 tests.

About plugin

  • Plugin page: list-pages-at-depth
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.2
  • WordPress version: 6.3.1
  • First release: Nov 26, 2009
  • Latest release: Nov 5, 2019
  • Number of updates: 30
  • Update frequency: every 121.0 days
  • Top authors: husobj (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /6,450 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.15ms] Passed 4 tests

A check of server-side resources used by List Pages at Depth
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.32 ▼2.18
Dashboard /wp-admin3.35 ▲0.0050.79 ▼12.57
Posts /wp-admin/edit.php3.40 ▲0.0452.38 ▲2.70
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.30 ▼4.30
Media Library /wp-admin/upload.php3.27 ▲0.0437.76 ▲2.45

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_pages_at_depth
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for List Pages at Depth
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.28 ▲0.011.73 ▼0.2442.63 ▼2.10
Dashboard /wp-admin2,192 ▲185.58 ▼0.0094.61 ▼33.8840.15 ▼2.64
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0139.74 ▲1.7935.27 ▲1.29
Add New Post /wp-admin/post-new.php1,528 ▲223.25 ▲0.12653.22 ▼40.3153.73 ▼7.23
Media Library /wp-admin/upload.php1,394 ▼64.22 ▲0.0699.24 ▼5.9945.67 ▼3.67

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_pages_at_depth
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/list-pages-at-depth/includes/widget.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/list-pages-at-depth/includes/widget.php:3

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 96% from 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: navigation, breadcrumbs, page parents, wp_list_pages, cms...

list-pages-at-depth/list-pages-at-depth.php 92% from 13 tests

This is the main PHP file of "List Pages at Depth" version 1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected163 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP26347163

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity12.00
▷ Minimum class complexity11.00
▷ Maximum class complexity13.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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
PNG images were not found in this plugin