78% generate-child-theme

Code Review | Generate Child Theme

WordPress plugin Generate Child Theme scored78%from 54 tests.

About plugin

  • Plugin page: generate-child-theme
  • Plugin version: 1.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.1
  • WordPress version: 6.3.1
  • First release: Feb 22, 2018
  • Latest release: Jan 31, 2023
  • Number of updates: 20
  • Update frequency: every 90.3 days
  • Top authors: catchthemes (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

7,000+ active /65,678 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.12MB] [CPU: ▼2.74ms] Passed 4 tests

Server-side resources used by Generate Child Theme
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1242.61 ▼2.04
Dashboard /wp-admin3.42 ▲0.1251.41 ▼7.80
Posts /wp-admin/edit.php3.54 ▲0.1852.89 ▲2.48
Add New Post /wp-admin/post-new.php6.01 ▲0.1292.65 ▼3.27
Media Library /wp-admin/upload.php3.35 ▲0.1240.12 ▲2.15

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Generate Child Theme
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.34 ▼0.221.93 ▲0.3240.98 ▼2.35
Dashboard /wp-admin2,211 ▲405.66 ▲0.1392.67 ▼1.3142.13 ▼0.67
Posts /wp-admin/edit.php2,116 ▲132.09 ▲0.1136.93 ▼3.7233.58 ▼4.49
Add New Post /wp-admin/post-new.php1,549 ▲2122.81 ▼0.31648.05 ▼55.9556.09 ▼5.84
Media Library /wp-admin/upload.php1,413 ▲104.20 ▼0.02101.02 ▼12.6443.17 ▼3.49

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/generate-child-theme/templates/child-theme-css.php
    • > /wp-content/plugins/generate-child-theme/templates/rtl-css.php
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: version in wp-content/plugins/generate-child-theme/templates/child-theme-css.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/generate-child-theme/partials/footer.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/generate-child-theme/partials/generate-child-theme-admin-display.php:17
    • > PHP Notice
      Undefined variable: theme_name in wp-content/plugins/generate-child-theme/templates/rtl-css.php on line 2
    • > PHP Notice
      Undefined variable: parent_theme_name in wp-content/plugins/generate-child-theme/templates/rtl-css.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/generate-child-theme/partials/CatchThemesThemePlugin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/generate-child-theme/partials/sidebar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/generate-child-theme/partials/dashboard-display.php:19
    • > PHP Notice
      Undefined variable: parent_theme_template in wp-content/plugins/generate-child-theme/templates/rtl-css.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/generate-child-theme/partials/ctp-tabs-removal.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Main Page), #2 (Infinite Scroll on blog posts page), #3 (Infinite Scroll on WooCommerce shop page)
The official readme.txt might help

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

The main PHP script in "Generate Child Theme" version 1.9 is automatically included on every request by WordPress
83 characters long description:
Create child themes of any WordPress themes effortlessly with Generate Child Theme.

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
No dangerous file extensions were detected1,553 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP10175175831
CSS213921668
JavaScript311454

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity34.50
▷ Minimum class complexity22.00
▷ Maximum class complexity47.00
Average method complexity4.35
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/free-plugin-246x116.png8.01KB3.81KB▼ 52.42%
images/premium-plugin-246x116.png9.01KB4.16KB▼ 53.83%