83% list-child-pages-shortcode

Code Review | List Child Pages Shortcode

WordPress plugin List Child Pages Shortcode scored83%from 54 tests.

About plugin

  • Plugin page: list-child-pages-...
  • Plugin version: 1.3.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.2
  • WordPress version: 6.3.1
  • First release: Jul 12, 2018
  • Latest release: Jul 31, 2019
  • Number of updates: 11
  • Update frequency: every 34.9 days
  • Top authors: douglaskarr (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

900+ active /5,145 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼8.26ms] Passed 4 tests

A check of server-side resources used by List Child Pages Shortcode
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0137.36 ▼1.47
Dashboard /wp-admin3.32 ▼0.0344.25 ▼15.55
Posts /wp-admin/edit.php3.37 ▲0.0145.95 ▼0.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0180.19 ▼15.41
Media Library /wp-admin/upload.php3.24 ▲0.0135.42 ▲3.18

Server storage [IO: ▲0.26MB] [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: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for List Child Pages Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.35 ▼0.041.84 ▲0.3140.59 ▼0.14
Dashboard /wp-admin2,198 ▲235.62 ▼0.0588.12 ▼13.2240.11 ▼2.14
Posts /wp-admin/edit.php2,100 ▼01.97 ▼0.0138.86 ▲4.7335.98 ▼3.41
Add New Post /wp-admin/post-new.php1,526 ▼023.19 ▲0.18659.10 ▼1.3355.69 ▲1.09
Media Library /wp-admin/upload.php1,394 ▼04.16 ▼0.0596.00 ▼3.3042.54 ▼0.99

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_post_type_support() in wp-content/plugins/list-child-pages-shortcode/dklcp-shortcode.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Please add an image for screenshot #1 (View of the output.)
You can take inspiration from this readme.txt

list-child-pages-shortcode/dklcp-shortcode.php 77% from 13 tests

The main PHP file in "List Child Pages Shortcode" ver. 1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 329 characters long)
  • Main file name: Name the main plugin file the same as the plugin slug ("list-child-pages-shortcode.php" instead of "dklcp-shortcode.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin51 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1252451

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.22
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%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.25MB with 0.18MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png172.59KB54.57KB▼ 68.38%
screenshot-1.png88.51KB25.04KB▼ 71.72%