79% kirki

Code Review | Kirki Customizer Framework

WordPress plugin Kirki Customizer Framework scored79%from 54 tests.

About plugin

  • Plugin page: kirki
  • Plugin version: 5.0.0
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.2.2
  • WordPress version: 6.3.1
  • First release: May 27, 2014
  • Latest release: Aug 4, 2023
  • Number of updates: 303
  • Update frequency: every 11.1 days
  • Top authors: aristath (86.8%)davidvongries (10.89%)themeum (2.31%)

Code review

54 tests

User reviews

75 reviews

Install metrics

600,000+ active /9,562,428 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲3.61MB] [CPU: ▲6.29ms] Passed 4 tests

A check of server-side resources used by Kirki Customizer Framework
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /7.05 ▲3.5959.80 ▲16.78
Dashboard /wp-admin6.97 ▲3.6263.08 ▼4.23
Posts /wp-admin/edit.php6.97 ▲3.6164.04 ▲9.50
Add New Post /wp-admin/post-new.php9.50 ▲3.61101.67 ▲4.20
Media Library /wp-admin/upload.php6.97 ▲3.7456.26 ▲15.68
Kirki /wp-admin/options-general.php?page=kirki_settings6.9752.52

Server storage [IO: ▲3.52MB] [DB: ▲0.24MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Kirki Customizer Framework
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,874 ▲12813.20 ▼1.091.84 ▼0.2132.14 ▼11.17
Dashboard /wp-admin2,239 ▲514.89 ▼1.00110.86 ▼9.7379.52 ▲36.57
Posts /wp-admin/edit.php2,140 ▲512.17 ▲0.1239.21 ▲4.7836.88 ▲0.71
Add New Post /wp-admin/post-new.php1,573 ▲4023.41 ▲0.10786.63 ▲177.3753.80 ▼1.07
Media Library /wp-admin/upload.php1,436 ▲484.13 ▼0.12101.93 ▼8.4991.67 ▲43.13
Kirki /wp-admin/options-general.php?page=kirki_settings9221.8529.4040.35

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

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

Smoke tests 50% 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 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
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/kirki/kirki-packages/settings/templates/metaboxes/clear-font-cache.php
    • > /wp-content/plugins/kirki/kirki-packages/settings/templates/metaboxes/documentation.php
    • > /wp-content/plugins/kirki/kirki-packages/settings/templates/metaboxes/installation-progress.php
    • > /wp-content/plugins/kirki/kirki-packages/settings/templates/settings-template.php
  • 85× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Module\\CSS\\Output' not found in wp-content/plugins/kirki/kirki-packages/field-typography/src/Field/CSS/Typography.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Field\\Select' not found in wp-content/plugins/kirki/kirki-packages/control-select/src/Field/Preset.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Field' not found in wp-content/plugins/kirki/kirki-packages/control-dashicons/src/Field/Dashicons.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Field\\ReactSelect' not found in wp-content/plugins/kirki/kirki-packages/control-select/src/Field/Select.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Control\\Base' not found in wp-content/plugins/kirki/pro-src/packages/kirki-pro-margin-padding/src/Control/Margin.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Field' not found in wp-content/plugins/kirki/kirki-packages/field-dimensions/src/Dimensions.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Field' not found in wp-content/plugins/kirki/pro-src/packages/kirki-pro-headline-divider/src/Field/Divider.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/kirki/kirki-packages/control-repeater/src/Settings/Repeater.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Control\\Base' not found in wp-content/plugins/kirki/kirki-packages/control-repeater/src/Control/Repeater.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Kirki\\Field' not found in wp-content/plugins/kirki/kirki-packages/control-multicheck/src/Field/Multicheck.php:20

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

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: customizer, gutenberg, toolkit, options framework, theme...

kirki/kirki.php Passed 13 tests

The principal PHP file in "Kirki Customizer Framework" v. 5.0.0 is loaded by WordPress automatically on each request
43 characters long description:
The Ultimate WordPress Customizer Framework

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 plugin34,969 lines of code in 389 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1152,2002,90512,186
PHP1973,55710,24311,013
JSON17108,693
Sass28396382,255
TypeScript5845414
CSS268948381
YAML17027

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity13.82
▷ Minimum class complexity1.00
▷ Maximum class complexity114.00
Average method complexity3.74
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces26
Interfaces0
Traits0
Classes175
▷ Abstract classes10.57%
▷ Concrete classes17499.43%
▷ Final classes95.17%
Methods815
▷ Static methods21826.75%
▷ Public methods66381.35%
▷ Protected methods10312.64%
▷ Private methods496.01%
Functions61
▷ Named functions1524.59%
▷ Anonymous functions4675.41%
Constants17
▷ Global constants17100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/3cl.png0.91KB0.32KB▼ 64.26%
assets/images/3cm.png0.91KB0.25KB▼ 72.00%
assets/images/2cl.png0.85KB0.27KB▼ 68.48%
assets/images/1c.png0.77KB0.15KB▼ 80.03%
assets/images/jquery.fs.stepper-arrows.png0.30KB0.18KB▼ 40.52%