78% wps-child-theme-generator

Code Review | WPS Child Theme Generator

WordPress plugin WPS Child Theme Generator scored78%from 54 tests.

About plugin

  • Plugin page: wps-child-theme-g...
  • Plugin version: 1.5.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.3
  • WordPress version: 6.3.1
  • First release: Jul 23, 2018
  • Latest release: Aug 24, 2023
  • Number of updates: 20
  • Update frequency: every 93.1 days
  • Top authors: NicolasKulka (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

9,000+ active /54,694 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼8.53ms] 75% from 4 tests

This is a short check of server-side resources used by WPS Child Theme Generator
Please fix the following
  • CPU: Total CPU usage should be kept under 500.00ms (currently 1,793.66ms on /wp-admin/tools.php?page=wps-child-theme-generator)
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.1744.30 ▼1.49
Dashboard /wp-admin3.73 ▲0.1056.73 ▼11.37
Posts /wp-admin/edit.php3.78 ▲0.1051.02 ▼2.37
Add New Post /wp-admin/post-new.php6.25 ▲0.1086.74 ▼18.90
Media Library /wp-admin/upload.php3.59 ▲0.1040.87 ▲0.23
WPS Child Theme Generator /wp-admin/tools.php?page=wps-child-theme-generator4.891,793.66

Server storage [IO: ▲13.08MB] [DB: ▲0.23MB] Passed 3 tests

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 76 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

WPS Child Theme Generator: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲4714.28 ▲0.302.04 ▼0.0147.45 ▲6.53
Dashboard /wp-admin2,199 ▲255.58 ▼0.0494.92 ▲1.4741.83 ▼3.40
Posts /wp-admin/edit.php2,104 ▲42.05 ▲0.0737.74 ▼1.4537.34 ▲1.02
Add New Post /wp-admin/post-new.php1,548 ▲823.33 ▲5.25593.96 ▼56.4457.99 ▲4.42
Media Library /wp-admin/upload.php1,404 ▲14.21 ▲0.0394.84 ▼4.7142.10 ▼0.12
WPS Child Theme Generator /wp-admin/tools.php?page=wps-child-theme-generator2,1378.1198.40130.28

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • 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
Good news, no errors were detected

SRP 0% 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
  • 5× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wps-child-theme-generator/blocks/pub.php
    • > /wp-content/plugins/wps-child-theme-generator/admin_page/plugin.php
    • > /wp-content/plugins/wps-child-theme-generator/blocks/pub-wpserveur.php
    • > /wp-content/plugins/wps-child-theme-generator/wps-child-theme-generator.php
    • > /wp-content/plugins/wps-child-theme-generator/blocks/title.php
  • 4× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Trait 'WPS\\WPS_Child_Theme_Generator\\Singleton' not found in wp-content/plugins/wps-child-theme-generator/classes/plugin.php on line 4
    • > PHP Fatal error
      Trait 'WPS\\WPS_Child_Theme_Generator\\Singleton' not found in wp-content/plugins/wps-child-theme-generator/classes/helpers.php on line 5
    • > PHP Warning
      Use of undefined constant WPS_CHILD_THEME_GENERATOR_DIR - assumed 'WPS_CHILD_THEME_GENERATOR_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wps-child-theme-generator/autoload.php on line 197
    • > PHP Warning
      Use of undefined constant WPS_CHILD_THEME_GENERATOR_DIR - assumed 'WPS_CHILD_THEME_GENERATOR_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/wps-child-theme-generator/autoload.php on line 203

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 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed: The official readme.txt is a good inspiration

wps-child-theme-generator/wps-child-theme-generator.php Passed 13 tests

This is the main PHP file of "WPS Child Theme Generator" version 1.5.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
26 characters long description:
WPS Child Theme Generator.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin18,823 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
SVG801616,450
PHP204334801,575
CSS35813465
PO File17981202
JavaScript32910103
JSON20028

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity18.67
▷ Minimum class complexity1.00
▷ Maximum class complexity68.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces3
Interfaces0
Traits1
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods70
▷ Static methods3955.71%
▷ Public methods6491.43%
▷ Protected methods45.71%
▷ Private methods22.86%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants6
▷ Global constants6100.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.07MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/check-and-tools-logo-in-plugin.png39.55KB7.80KB▼ 80.28%
assets/img/wps-child-theme-generator-logo.png35.61KB6.48KB▼ 81.80%