Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼2.44ms] Passed 4 tests
Analyzing server-side resources used by Content Restrict
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.02 | 45.95 ▲0.24 |
Dashboard /wp-admin | 3.33 ▲0.03 | 47.25 ▼2.13 |
Posts /wp-admin/edit.php | 3.39 ▲0.03 | 51.30 ▲0.75 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.03 | 91.02 ▼5.23 |
Media Library /wp-admin/upload.php | 3.26 ▲0.02 | 33.01 ▼2.62 |
Server storage [IO: ▲0.50MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_recent-posts |
can_compress_scripts |
cr_version |
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
cr_contentstype |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Content Restrict
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,805 ▲44 | 14.70 ▲0.47 | 1.77 ▲0.06 | 44.12 ▼0.86 |
Dashboard /wp-admin | 2,214 ▲34 | 5.56 ▲0.02 | 81.89 ▼8.31 | 39.40 ▼7.14 |
Posts /wp-admin/edit.php | 2,116 ▲13 | 2.02 ▲0.05 | 38.04 ▲0.43 | 35.66 ▼1.19 |
Add New Post /wp-admin/post-new.php | 6,257 ▲4,731 | 26.10 ▲2.52 | 881.51 ▲251.33 | 60.54 ▲7.43 |
Media Library /wp-admin/upload.php | 1,413 ▲13 | 4.23 ▲0.02 | 102.45 ▼3.81 | 45.62 ▼0.94 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
- Zombie WordPress options were found after uninstall: 8 options
- widget_recent-comments
- widget_recent-posts
- cr_contentstype
- widget_theysaidso_widget
- theysaidso_admin_options
- cr_version
- db_upgraded
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 50% from 2 tests
🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
- 1× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/content-restrict/admin/cr_admin_panel.php:26
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
7 plugin tags: for logged in user, restriction, custom post type restrict, post, pages...
content-restrict/contentrestrict.php 92% from 13 tests
The primary PHP file in "Content Restrict" version 0.1 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Main file name: It is recommended to name the main PHP file as the plugin slug ("content-restrict.php" instead of "contentrestrict.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected143 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 39 | 26 | 143 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.50MB with 0.34MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin.png | 155.49KB | 45.92KB | ▼ 70.47% |
front.png | 157.65KB | 44.83KB | ▼ 71.56% |
screenshot-1.png | 100.00KB | 33.33KB | ▼ 66.67% |
screenshot-2.png | 93.87KB | 35.54KB | ▼ 62.14% |