Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼7.94ms] Passed 4 tests
Server-side resources used by WP Content Permission
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.51 ▲0.05 | 38.71 ▼3.05 |
Dashboard /wp-admin | 3.40 ▲0.09 | 42.87 ▼7.49 |
Posts /wp-admin/edit.php | 3.43 ▲0.08 | 46.04 ▲2.54 |
Add New Post /wp-admin/post-new.php | 6.09 ▲0.20 | 76.20 ▼13.53 |
Media Library /wp-admin/upload.php | 3.33 ▲0.11 | 29.98 ▼7.67 |
WP Content Permission /wp-admin/options-general.php?page=wp-content-permission | 3.29 | 33.81 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 26 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
widget_recent-posts |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for WP Content Permission
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,924 ▲189 | 13.94 ▼0.47 | 5.58 ▲3.70 | 42.96 ▼3.78 |
Dashboard /wp-admin | 2,216 ▲28 | 5.81 ▲0.91 | 99.04 ▼15.89 | 40.49 ▼4.87 |
Posts /wp-admin/edit.php | 2,104 ▲12 | 2.05 ▲0.07 | 35.89 ▼0.14 | 39.32 ▲2.40 |
Add New Post /wp-admin/post-new.php | 6,479 ▲4,960 | 20.02 ▼3.37 | 915.76 ▲209.14 | 52.89 ▼26.25 |
Media Library /wp-admin/upload.php | 1,407 ▲19 | 4.25 ▲0.07 | 96.65 ▼9.26 | 42.48 ▼4.99 |
WP Content Permission /wp-admin/options-general.php?page=wp-content-permission | 919 | 2.19 | 22.69 | 30.45 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- can_compress_scripts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/wp-content-permission/public/views/public.php
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/wp-content-permission/admin/includes/ohmem-settings.php:139
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-content-permission/admin/views/admin.php:18
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: block content, private area, restricted content, memebers
wp-content-permission/plugin.php 85% from 13 tests
"WP Content Permission" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-content-permission.php" instead of "plugin.php")
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin479 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 175 | 446 | 467 |
JavaScript | 2 | 8 | 2 | 10 |
CSS | 2 | 0 | 2 | 2 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.29 |
Average class complexity | 14.00 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 21.00 |
Average method complexity | 1.93 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 42 | |
▷ Static methods | 7 | 16.67% |
▷ Public methods | 37 | 88.10% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 11.90% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 1 | 100.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin