No unsafe-inline 1.1.1

Does No unsafe-inline work with WordPress 6.2.2 and PHP 8.1.12? A smoke test was performed on .

Summary

Errors
1PHP warnings
No JavaScript exceptions
All test pages loaded successfully
No resource errors
Performance

Memory usage: 134.78 KiB
The average PHP memory usage increased by this amount after activating by the plugin.

Page speed impact: insignificant.
The plugin didn't make the site noticeably slower.

Environment
WordPress version6.2.2
PHP version8.1.12
MySQL version10.6.10
PHP memory limit512M
Plugin Info
Last updated
Active installs 100+
WordPress.org page https://wordpress.org/plugins/no-unsafe-inline/
Badges

WordPress compatibility badge PHP compatibility badge

Get badge code

Pages 9

Plugins ‹ Test site — WordPress

Page screenshot: Plugins ‹ Test site — WordPress
URL /wp-admin/plugins.php?plugin_status=all&paged=1&s
Requested URL /wp-admin/plugins.php?action=activate&plugin=no-unsafe-inline%2Fno-unsafe-inline.php&plugin_status=all&paged=1&s&_wpnonce=b54f6e3291
Aspect after-activation
HTTP status 200
Load time 0.448 s
Memory usage 3.16 MiB
JS errors None
Resource errors None

Settings → CSP settings

Page screenshot: Settings → CSP settings
URL /wp-admin/options-general.php?page=no-unsafe-inline
Aspect menu-item
HTTP status 200
Load time 0.263 s
Memory usage 3.56 MiB
JS errors None
Resource errors None

Settings → CSP settings → Base rules

Page screenshot: Settings → CSP settings → Base rules
URL /wp-admin/options-general.php?page=no-unsafe-inline&tab=base-rule
Aspect menu-item-tab
HTTP status 200
Load time 0.162 s
Memory usage 3.19 MiB
JS errors None
Resource errors None

Settings → CSP settings → External whitelist

Page screenshot: Settings → CSP settings → External whitelist
URL /wp-admin/options-general.php?page=no-unsafe-inline&tab=external
Aspect menu-item-tab
HTTP status 200
Load time 0.163 s
Memory usage 3.24 MiB
JS errors None
Resource errors None

Settings → CSP settings → Inline whitelist

Page screenshot: Settings → CSP settings → Inline whitelist
URL /wp-admin/options-general.php?page=no-unsafe-inline&tab=inline
Aspect menu-item-tab
HTTP status 200
Load time 0.150 s
Memory usage 3.23 MiB
JS errors None
Resource errors None

Settings → CSP settings → Events whitelist

Page screenshot: Settings → CSP settings → Events whitelist
URL /wp-admin/options-general.php?page=no-unsafe-inline&tab=events
Aspect menu-item-tab
HTTP status 200
Load time 0.147 s
Memory usage 3.22 MiB
JS errors None
Resource errors None

Settings → CSP settings → Settings

Page screenshot: Settings → CSP settings → Settings
URL /wp-admin/options-general.php?page=no-unsafe-inline&tab=settings
Aspect menu-item-tab
HTTP status 200
Load time 0.195 s
Memory usage 3.17 MiB
JS errors None
Resource errors None

Settings → CSP settings → Logs

Page screenshot: Settings → CSP settings → Logs
URL /wp-admin/options-general.php?page=no-unsafe-inline&tab=logs
Aspect menu-item-tab
HTTP status 200
Load time 0.154 s
Memory usage 3.18 MiB
JS errors None
Resource errors None

Test site – Just another WordPress site

Page screenshot: Test site – Just another WordPress site
URL /
Aspect front-page
HTTP status 200
Load time 0.199 s
Memory usage 3.08 MiB
JS errors None
Resource errors None

Benchmark

URL Load time Memory usage
Inactive Active Change Inactive Active Change
/wp-admin/index.php0.280 s0.246 s-0.034 s3.07 MiB3.21 MiB+ 145.87 KiB
/wp-admin/edit.php0.162 s0.161 s-0.001 s3.1 MiB3.24 MiB+ 144.48 KiB
/wp-admin/post-new.php0.704 s0.914 s+0.210 s5.02 MiB5.17 MiB+ 149.44 KiB
/wp-admin/upload.php0.655 s0.416 s-0.239 s3.02 MiB3.14 MiB+ 128.19 KiB
/wp-admin/options-writing.php0.200 s0.127 s-0.073 s3.01 MiB3.12 MiB+ 114.88 KiB
/wp-admin/media-new.php0.236 s0.199 s-0.037 s2.99 MiB3.13 MiB+ 140.38 KiB
/wp-admin/edit-tags.php?taxonomy=category0.166 s0.156 s-0.010 s3.01 MiB3.15 MiB+ 145.55 KiB
/wp-admin/post-new.php?post_type=page0.550 s0.548 s-0.002 s5.01 MiB5.16 MiB+ 145.02 KiB
/wp-admin/options-discussion.php0.182 s0.205 s+0.023 s3 MiB3.13 MiB+ 128.62 KiB
/wp-admin/edit-comments.php0.186 s0.179 s-0.007 s3.03 MiB3.15 MiB+ 128.18 KiB
/0.262 s0.274 s+0.012 s2.97 MiB3.08 MiB+ 112.01 KiB
Average 0.326 s0.311 s-0.014 s3.38 MiB3.52 MiB+ 134.78 KiB

Code Statistics

Note: Third-party libraries and minified JS/CSS files are excluded from these statistics where possible, so the numbers you see here may be lower than those reported by other tools.

PHP
CSS
PO File
Language % Lines of code Comment lines Files
PHP50.8%8,3994,16848
CSS35.4%5,85430412
PO File9.0%1,4905961
JavaScript4.6%758995
JSON0.3%4801
Total 16,549 5,167 67

PHP Code Analysis | More results »

Lines of code 7,993
Total complexity 1,485
Median class complexity 16.5
Median method complexity 2.0
Most complex class No_Unsafe_Inline_Admin
Most complex function NUNIL\Nunil_Manipulate_DOM::manipulate_external_node()
Classes 32
Methods 348
Functions 7

Additions

Things that the plugin adds to the site. This section is not intended to be comprehensive. The test tool only looks for a few specific types of added content.

Database Tables 5

Options wp_options 5

PHP Error Log 1 lines

[26-May-2023 23:24:25 UTC] PHP Warning:  copy(/wp-content/mu-plugins/no-unsafe-inline-output-buffering.php): Failed to open stream: Permission denied in /wp-content/plugins/no-unsafe-inline/src/Nunil_Manage_Muplugin.php on line 69
See also: All tests for this plugin, How to Hide the "CSP settings" Admin Menu