No unsafe-inline 1.0.0

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

Summary

Errors
No PHP errors, warnings or notices
No JavaScript exceptions
All test pages loaded successfully
No resource errors
Looks good! No problems were detected.
Performance

Memory usage: 189.52 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 version5.9.2
PHP version7.4.8
MySQL version8.0.21
PHP memory limit256M
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=b5f0c0d59e
Aspect after-activation
HTTP status 200
Load time 0.478 s
Memory usage 3.45 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.321 s
Memory usage 3.9 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.216 s
Memory usage 3.47 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.171 s
Memory usage 3.5 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.165 s
Memory usage 3.49 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.158 s
Memory usage 3.49 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.191 s
Memory usage 3.46 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.158 s
Memory usage 3.45 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.213 s
Memory usage 3.43 MiB
JS errors None
Resource errors None

Benchmark

URL Load time Memory usage
Inactive Active Change Inactive Active Change
/wp-admin/index.php0.353 s0.281 s-0.072 s3.37 MiB3.57 MiB+ 201.58 KiB
/wp-admin/edit.php0.215 s0.194 s-0.021 s3.4 MiB3.58 MiB+ 184.88 KiB
/wp-admin/post-new.php1.332 s1.227 s-0.105 s6.15 MiB6.38 MiB+ 233.45 KiB
/wp-admin/upload.php0.425 s0.364 s-0.061 s3.25 MiB3.47 MiB+ 224.45 KiB
/wp-admin/options-writing.php0.317 s0.139 s-0.178 s3.24 MiB3.4 MiB+ 160.23 KiB
/wp-admin/media-new.php0.237 s0.194 s-0.043 s3.23 MiB3.4 MiB+ 176.62 KiB
/wp-admin/edit-tags.php?taxonomy=category0.181 s0.276 s+0.095 s3.27 MiB3.48 MiB+ 215.07 KiB
/wp-admin/post-new.php?post_type=page1.772 s1.041 s-0.731 s6.15 MiB6.37 MiB+ 229.04 KiB
/wp-admin/options-discussion.php0.220 s0.210 s-0.010 s3.22 MiB3.4 MiB+ 176.87 KiB
/wp-admin/edit-comments.php0.217 s0.230 s+0.013 s3.27 MiB3.51 MiB+ 248.43 KiB
/0.319 s0.206 s-0.113 s3.4 MiB3.43 MiB+ 34.13 KiB
Average 0.508 s0.397 s-0.111 s3.81 MiB4 MiB+ 189.52 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
PHP55.3%7,8343,84044
CSS29.2%4,1392045
PO File10.5%1,4905961
JavaScript4.7%666964
JSON0.3%3801
Total 14,167 4,736 55

PHP Code Analysis | More results »

Lines of code 7,563
Total complexity 1,387
Median class complexity 16.0
Median method complexity 2.0
Most complex class No_Unsafe_Inline_Admin
Most complex function No_Unsafe_Inline_Public::output_csp_headers()
Classes 32
Methods 330
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

The log file is empty.

See also: All tests for this plugin, How to Hide the "CSP settings" Admin Menu