84% child-theme-check

Code Review | Child Theme Check

WordPress plugin Child Theme Check scored 84% from 54 tests.

About plugin

  • Plugin page: child-theme-check
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-5.7
  • WordPress version: 6.3.1
  • First release: Sep 26, 2015
  • Latest release: May 2, 2021
  • Number of updates: 13
  • Update frequency: every 158.8 days
  • Top authors: zodiac1978 (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

900+ active / 15,388 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.81ms] Passed 4 tests

This is a short check of server-side resources used by Child Theme Check
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.63 ▼2.22
Dashboard /wp-admin3.32 ▲0.0242.44 ▼9.22
Posts /wp-admin/edit.php3.37 ▲0.0243.63 ▼4.36
Add New Post /wp-admin/post-new.php5.90 ▲0.0289.70 ▼3.43
Media Library /wp-admin/upload.php3.24 ▲0.0236.15 ▼1.97
Child Theme Check /wp-admin/tools.php?page=tplc-status3.2430.67

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_recent-posts
tplc_admin_notices
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Child Theme Check
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7114.48 ▼0.171.82 ▼0.1239.78 ▼5.90
Dashboard /wp-admin2,215 ▲275.79 ▲0.7299.23 ▼8.3336.80 ▼6.12
Posts /wp-admin/edit.php2,098 ▲92.05 ▲0.0834.99 ▼5.5634.21 ▼0.83
Add New Post /wp-admin/post-new.php1,526 ▼723.39 ▲0.16665.34 ▲17.0556.04 ▲3.44
Media Library /wp-admin/upload.php1,394 ▲94.24 ▲0.03103.08 ▲2.4244.78 ▼2.09
Child Theme Check /wp-admin/tools.php?page=tplc-status8242.0224.2925.32

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_x() in wp-content/plugins/child-theme-check/includes/admin/views/html-admin-page-status.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: child theme, child theme check, theme, child, check

child-theme-check/child-theme-check.php Passed 13 tests

"Child Theme Check" version 1.0.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
69 characters long description:
This plugin can warn you about old template files in your child theme

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
Success! There were no dangerous files found in this plugin665 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP12165289542
CSS21185
Markdown122038

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity5.67
▷ Minimum class complexity1.00
▷ Maximum class complexity13.00
Average method complexity1.90
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes116.67%
Methods31
▷ Static methods1032.26%
▷ Public methods2993.55%
▷ Protected methods00.00%
▷ Private methods26.45%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected