Allow PHP in Posts and Pages 3.0.4

Does Allow PHP in Posts and Pages work with WordPress 6.8.1 and PHP 8.1.12? A smoke test was performed on .

Summary

Errors
The plugin could not be activated
1PHP fatal errors
No JavaScript exceptions
No resource errors
Performance

No data available.

Environment
WordPress version6.8.1
PHP version8.1.12
MySQL version10.6.10
PHP memory limit512M
Plugin Info
Last updated
Active installs 10,000+
WordPress.org page https://wordpress.org/plugins/allow-php-in-posts-and-pages/
Badges

WordPress compatibility badge PHP compatibility badge

Get badge code

Pages 1

Plugins ‹ Test site — WordPress

Page screenshot: Plugins ‹ Test site — WordPress
URL /wp-admin/plugins.php?plugin=allow-php-in-posts-and-pages%2Fallowphp.php
Requested URL /wp-admin/plugins.php?action=activate&plugin=allow-php-in-posts-and-pages%2Fallowphp.php&plugin_status=all&paged=1&s&_wpnonce=afedc62647
Aspect after-activation
HTTP status 200
Load time 0.249 s
Memory usage 3.52 MiB
JS errors None
Resource errors None

Benchmark

No benchmark data available.

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
Language % Lines of code Comment lines Files
PHP86.3%541122
CSS13.7%8611
Total 627 13 3

PHP Code Analysis | More results »

Lines of code 448
Total complexity 65
Median class complexity 64.0
Median method complexity 1.0
Most complex class allow_php_in_posts
Most complex function allow_php_in_posts::check_post()
Classes 1
Methods 26
Functions 1

Additions

No data available.

PHP Error Log 8 lines

[01-May-2025 12:18:49 UTC] PHP Fatal error:  Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, non-static method allow_php_in_posts::hook_activation() cannot be called statically in /wp-includes/class-wp-hook.php:324
Stack trace:
#0 /wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#1 /wp-includes/plugin.php(517): WP_Hook->do_action()
#2 /wp-admin/includes/plugin.php(703): do_action()
#3 /wp-admin/plugins.php(60): activate_plugin()
#4 {main}
  thrown in /wp-includes/class-wp-hook.php on line 324
See also: All tests for this plugin