74% list-sub-pages

Code Review | List Subpages

WordPress plugin List Subpages scored74%from 54 tests.

About plugin

  • Plugin page: list-sub-pages
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.1
  • WordPress version: 6.3.1
  • First release: Feb 8, 2014
  • Latest release: Feb 1, 2023
  • Number of updates: 12
  • Update frequency: every 273.4 days
  • Top authors: WeblineIndia (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

400+ active /7,971 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼2.88ms] Passed 4 tests

Server-side resources used by List Subpages
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0942.72 ▼1.69
Dashboard /wp-admin3.39 ▲0.0852.95 ▼0.78
Posts /wp-admin/edit.php3.44 ▲0.0849.84 ▲1.26
Add New Post /wp-admin/post-new.php5.99 ▲0.1091.50 ▼10.30
Media Library /wp-admin/upload.php3.31 ▲0.0837.31 ▲1.57
List Sub Pages /wp-admin/options-general.php?page=sub-page3.2935.36

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
list_subpage_settings
widget_recent-comments
widget_ls_sub_pages
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by List Subpages
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲914.58 ▲0.181.76 ▼0.1646.79 ▼1.99
Dashboard /wp-admin2,204 ▲275.64 ▼0.0187.37 ▼2.2340.41 ▼0.87
Posts /wp-admin/edit.php2,106 ▲62.14 ▲0.1136.77 ▼2.4935.45 ▲2.27
Add New Post /wp-admin/post-new.php1,533 ▲723.54 ▲0.62672.53 ▼43.7063.57 ▲9.66
Media Library /wp-admin/upload.php1,406 ▲64.25 ▲0.0198.40 ▼8.4041.98 ▼2.80
List Sub Pages /wp-admin/options-general.php?page=sub-page1,0492.2226.6630.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/list-sub-pages/plugin_list_subpages.php+47
    Undefined variable: default_values
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_ls_sub_pages
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

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
Even though everything seems fine, this is not 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 fix the following items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/list-sub-pages/plugin_list_subpages.php on line 11
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/list-sub-pages/plugin_list_subpages.php on line 11
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/list-sub-pages/plugin_list_subpages.php on line 11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/list-sub-pages/views/Back-End/create_shortcode.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
4 plugin tags: subpages, list subpages shortcode, list subpages, list subpages widget

list-sub-pages/plugin_list_subpages.php 92% from 13 tests

Analyzing the main PHP file in "List Subpages" version 1.0.2
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("list-sub-pages.php" instead of "plugin_list_subpages.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin851 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP3124109440
PO File3118456270
JavaScript1270141

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 complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods228.57%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG images were found in this plugin