No unsafe-inline 1.2.0

Does No unsafe-inline work with WordPress 6.5.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: 140.15 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.5.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=d4994ee717
Aspect after-activation
HTTP status 200
Load time 0.405 s
Memory usage 3.55 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.317 s
Memory usage 3.59 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.199 s
Memory usage 3.56 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.187 s
Memory usage 3.56 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.170 s
Memory usage 3.52 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.179 s
Memory usage 3.52 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.227 s
Memory usage 3.54 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.168 s
Memory usage 3.55 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.157 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.338 s0.517 s+0.179 s3.44 MiB3.59 MiB+ 161.2 KiB
/wp-admin/edit.php0.191 s0.178 s-0.013 s3.46 MiB3.62 MiB+ 160.13 KiB
/wp-admin/post-new.php0.796 s0.506 s-0.290 s5.59 MiB5.75 MiB+ 164.77 KiB
/wp-admin/upload.php0.596 s0.341 s-0.255 s3.38 MiB3.52 MiB+ 143.84 KiB
/wp-admin/options-writing.php0.199 s0.164 s-0.035 s3.37 MiB3.51 MiB+ 135.73 KiB
/wp-admin/media-new.php0.283 s0.197 s-0.086 s3.35 MiB3.5 MiB+ 156.02 KiB
/wp-admin/edit-tags.php?taxonomy=category0.181 s0.313 s+0.132 s3.37 MiB3.53 MiB+ 161.2 KiB
/wp-admin/post-new.php?post_type=page0.509 s0.553 s+0.044 s5.59 MiB5.74 MiB+ 160.36 KiB
/wp-admin/options-discussion.php0.269 s0.227 s-0.042 s3.36 MiB3.5 MiB+ 144.27 KiB
/wp-admin/edit-comments.php0.230 s0.200 s-0.030 s3.39 MiB3.53 MiB+ 143.83 KiB
/0.269 s0.179 s-0.090 s3.42 MiB3.43 MiB+ 10.26 KiB
Average 0.351 s0.307 s-0.044 s3.79 MiB3.93 MiB+ 140.15 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
PHP53.4%9,5114,83852
CSS33.1%5,90228912
PO File8.4%1,4905961
JavaScript4.9%865745
JSON0.3%4801
Total 17,816 5,797 71

PHP Code Analysis | More results »

Lines of code 9,031
Total complexity 1,713
Median class complexity 21.0
Median method complexity 2.0
Most complex class No_Unsafe_Inline_Admin
Most complex function NUNIL\Nunil_Manipulate_DOM::manipulate_external_node()
Classes 35
Methods 405
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 6

PHP Error Log 1 lines

[06-May-2024 09:08:50 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 68
See also: All tests for this plugin, How to Hide the "CSP settings" Admin Menu