Restrict Content 3.1.7

Does Restrict Content work with WordPress 6.1.1 and PHP 7.4.8? A smoke test was performed on .

Summary

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

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

Page speed impact: 0.028 seconds
The average page load time increased by this amount after activating the plugin.

Environment
WordPress version6.1.1
PHP version7.4.8
MySQL version8.0.21
PHP memory limit256M
Plugin Info
Last updated
Active installs 10,000+
WordPress.org page https://wordpress.org/plugins/restrict-content/
Badges

WordPress compatibility badge PHP compatibility badge

Get badge code

Pages 7

‹ Test site — WordPress

Page screenshot: ‹ Test site — WordPress
URL /wp-admin/admin.php?page=restrict-content-welcome
Requested URL /wp-admin/plugins.php?action=activate&plugin=restrict-content%2Frestrictcontent.php&plugin_status=all&paged=1&s&_wpnonce=411bb37d74
Aspect after-activation
HTTP status 200
Load time 2.014 s
Memory usage 4.88 MiB
JS errors
[
    {
        "message": "TypeError: Cannot read properties of undefined (reading 'hasAttribute')\n    at determineDelay (/wp-content/plugins/restrict-content/legacy/includes/assets/js/rc-admin.js?ver=3.5.24:230:36)\n    at /wp-content/plugins/restrict-content/legacy/includes/assets/js/rc-admin.js?ver=3.5.24:12:21\n    at HTMLDocument.<anonymous> (/wp-content/plugins/restrict-content/legacy/includes/assets/js/rc-admin.js?ver=3.5.24:262:6)\n    at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.1.1:2:30038)\n    at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.1.1:2:30340)",
        "trace": null,
        "code": null
    }
]
Resource errors None

Posts → Restrict Access

Page screenshot: Posts → Restrict Access
URL /wp-admin/edit.php?page=rcp-restrict-post-type
Aspect menu-item
HTTP status 200
Load time 0.194 s
Memory usage 4.84 MiB
JS errors None
Resource errors None

Pages → Restrict Access

Page screenshot: Pages → Restrict Access
URL /wp-admin/edit.php?post_type=page&page=rcp-restrict-post-type-page
Aspect menu-item
HTTP status 200
Load time 0.173 s
Memory usage 4.78 MiB
JS errors None
Resource errors None

Restrict

Page screenshot: Restrict
URL /wp-admin/admin.php?page=rcp-members
Aspect menu-item
HTTP status 200
Load time 0.271 s
Memory usage 5.17 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.265 s
Memory usage 4.57 MiB
JS errors None
Resource errors None

Add New Post ‹ Test site — WordPress

Page screenshot: Add New Post ‹ Test site — WordPress
URL /wp-admin/post-new.php
Aspect new-meta-boxes
HTTP status 200
Load time 1.131 s
Memory usage 6.89 MiB
JS errors None
Resource errors None

Add New Page ‹ Test site — WordPress

Page screenshot: Add New Page ‹ Test site — WordPress
URL /wp-admin/post-new.php?post_type=page
Aspect new-meta-boxes
HTTP status 200
Load time 1.517 s
Memory usage 6.88 MiB
JS errors None
Resource errors None

Benchmark

URL Load time Memory usage
Inactive Active Change Inactive Active Change
/wp-admin/index.php0.277 s0.310 s+0.033 s3.54 MiB4.86 MiB+ 1.32 MiB
/wp-admin/edit.php0.180 s0.221 s+0.041 s3.57 MiB5.04 MiB+ 1.47 MiB
/wp-admin/post-new.php1.024 s1.208 s+0.184 s5.46 MiB6.89 MiB+ 1.43 MiB
/wp-admin/upload.php0.692 s0.536 s-0.156 s3.41 MiB4.8 MiB+ 1.39 MiB
/wp-admin/options-writing.php0.162 s0.191 s+0.029 s3.4 MiB4.78 MiB+ 1.38 MiB
/wp-admin/media-new.php0.241 s0.226 s-0.015 s3.39 MiB4.76 MiB+ 1.38 MiB
/wp-admin/edit-tags.php?taxonomy=category0.166 s0.229 s+0.063 s3.48 MiB4.82 MiB+ 1.34 MiB
/wp-admin/post-new.php?post_type=page0.906 s0.970 s+0.064 s5.46 MiB6.88 MiB+ 1.42 MiB
/wp-admin/options-discussion.php0.212 s0.239 s+0.027 s3.38 MiB4.78 MiB+ 1.39 MiB
/wp-admin/edit-comments.php0.186 s0.248 s+0.062 s3.48 MiB4.81 MiB+ 1.33 MiB
/0.263 s0.240 s-0.023 s3.47 MiB4.57 MiB+ 1.1 MiB
Average 0.392 s0.420 s+0.028 s3.82 MiB5.18 MiB+ 1.36 MiB

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.

PO File
PHP
Language % Lines of code Comment lines Files
PO File50.4%82,88446,77417
PHP44.1%72,50347,867528
CSS2.3%3,70915424
JavaScript2.1%3,51899822
Markdown0.7%1,20605
SVG0.2%248035
JSON0.1%21905
Sass0.0%5402
XML0.0%3101
make0.0%2701
Total 164,399 95,793 640

PHP Code Analysis | More results »

Lines of code 59,731
Total complexity 13,796
Median class complexity 4.0
Median method complexity 2.0
Most complex class Freemius
Most complex function rcp_tools_system_info_report()
Classes 326
Methods 2,671
Functions 793

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 11

Options wp_options 20

User Metadata wp_usermeta 1

Custom Post Types 1

ID Name
wp_logLogs

Meta Boxes

{
    "post": {
        "rcp_meta_box": {
            "title": "Restrict this content",
            "context": "normal"
        }
    },
    "page": {
        "rcp_meta_box": {
            "title": "Restrict this content",
            "context": "normal"
        }
    }
}

Capabilities 11

PHP Error Log 7 lines

[18-Nov-2022 16:22:56 UTC] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'CONTAINS '[restrict]' OR 
                          post_content CONTAINS '[not_' at line 2 for query SELECT * FROM wp_posts WHERE 
                          post_content CONTAINS '[restrict]' OR 
                          post_content CONTAINS '[not_logged_in]' OR
                          post_content CONTAINS '[login_form]' OR
                          post_content CONTAINS '[register_form]' OR
                          LIMIT 1 made by activate_plugin, plugin_sandbox_scrape, include_once('/plugins/restrict-content/restrictcontent.php'), RC_Requirements_Check->__construct, RC_Requirements_Check->load, RC_Requirements_Check->restrict_content_check_posts_for_shortcode
See also: All tests for this plugin, How to Hide Restrict Content Admin Menus and Meta Boxes