84% child-pages-card

Code Review | Child Pages Card

WordPress plugin Child Pages Card scored84%from 54 tests.

About plugin

  • Plugin page: child-pages-card
  • Plugin version: 1.14
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.4
  • WordPress version: 6.3.1
  • First release: Nov 10, 2019
  • Latest release: Dec 2, 2023
  • Number of updates: 40
  • Update frequency: every 37.1 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /1,932 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
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Child Pages Card
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.54 ▼3.74
Dashboard /wp-admin3.39 ▲0.0547.12 ▼13.41
Posts /wp-admin/edit.php3.45 ▲0.0951.76 ▲1.31
Add New Post /wp-admin/post-new.php5.98 ▲0.0992.43 ▼4.74
Media Library /wp-admin/upload.php3.32 ▲0.0938.52 ▼8.18
Child Pages Card /wp-admin/options-general.php?page=childpagescard3.2940.96

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Child Pages Card
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5714.24 ▼0.131.77 ▲0.1542.40 ▲2.93
Dashboard /wp-admin2,204 ▲235.62 ▼0.0695.28 ▼15.1040.81 ▼4.59
Posts /wp-admin/edit.php2,112 ▲92.01 ▲0.0139.13 ▼5.0637.16 ▼0.25
Add New Post /wp-admin/post-new.php1,693 ▲16721.77 ▼1.55623.51 ▼4.3259.87 ▲8.02
Media Library /wp-admin/upload.php1,409 ▲64.13 ▼0.0996.06 ▼1.6941.86 ▼0.32
Child Pages Card /wp-admin/options-general.php?page=childpagescard1,1332.4557.4929.61

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • 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)
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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/child-pages-card/lib/class-childpagescard.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/child-pages-card/lib/class-childpagescard.php:37
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/child-pages-card/lib/class-childpagescardadmin.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 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
5 plugin tags: archives, shortcode, child page, page, block

child-pages-card/childpagescard.php 92% from 13 tests

Analyzing the main PHP file in "Child Pages Card" version 1.14
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("child-pages-card.php" instead of "childpagescard.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 detected614 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP581154443
JavaScript51539103
JSON30068
CSS13170

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity25.50
▷ Minimum class complexity18.00
▷ Maximum class complexity33.00
Average method complexity4.77
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods969.23%
▷ Protected methods00.00%
▷ Private methods430.77%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
There were not PNG files found in your plugin