84% child-pages-shortcode

Code Review | Child Pages Shortcode

WordPress plugin Child Pages Shortcode scored84%from 54 tests.

About plugin

  • Plugin page: child-pages-short...
  • Plugin version: 1.9.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.2
  • WordPress version: 6.3.1
  • First release: Oct 11, 2011
  • Latest release: Apr 26, 2015
  • Number of updates: 57
  • Update frequency: every 22.8 days
  • Top authors: miyauchi (100%)

Code review

54 tests

User reviews

20 reviews

Install metrics

7,000+ active /91,739 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼0.54ms] Passed 4 tests

Analyzing server-side resources used by Child Pages Shortcode
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.71 ▼1.27
Dashboard /wp-admin3.33 ▲0.0348.58 ▼1.61
Posts /wp-admin/edit.php3.38 ▲0.0249.00 ▼1.07
Add New Post /wp-admin/post-new.php5.91 ▲0.0288.90 ▲2.56
Media Library /wp-admin/upload.php3.25 ▲0.0239.33 ▲1.81

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Child Pages Shortcode
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11113.51 ▼1.088.81 ▲7.0442.93 ▲0.35
Dashboard /wp-admin2,195 ▲185.56 ▼0.0786.29 ▼4.3138.22 ▼2.40
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0139.97 ▲4.7435.98 ▲3.26
Add New Post /wp-admin/post-new.php1,554 ▲2818.06 ▲0.36608.17 ▼55.0951.89 ▼5.62
Media Library /wp-admin/upload.php1,403 ▲64.21 ▼0.0396.39 ▼8.1145.89 ▼5.01

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
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_action() in wp-content/plugins/child-pages-shortcode/child-pages-shortcode.php:22

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
1 plugin tags: shortcode

child-pages-shortcode/child-pages-shortcode.php Passed 13 tests

The entry point to "Child Pages Shortcode" version 1.9.3 is a PHP file that has certain tags in its header comment area
60 characters long description:
You can use shortcode for display child pages from the page.

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
Good job! No executable or dangerous file extensions detected232 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP12955139
CSS29054
PO File15722
JavaScript20017

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/camera.png1.91KB0.59KB▼ 69.22%
img/bg-white.png0.20KB0.16KB▼ 18.23%