Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.60MB] [CPU: ▼2.99ms] Passed 4 tests
This is a short check of server-side resources used by Restrict - membership, site, content and user access restrictions for WordPress
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.07 ▲0.62 | 39.30 ▼4.78 |
Dashboard /wp-admin | 3.91 ▲0.61 | 50.16 ▼0.34 |
Posts /wp-admin/edit.php | 3.96 ▲0.61 | 52.02 ▲5.24 |
Add New Post /wp-admin/post-new.php | 6.46 ▲0.57 | 90.75 ▼8.16 |
Media Library /wp-admin/upload.php | 3.82 ▲0.59 | 37.88 ▲1.34 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 4.00 | 37.63 |
Server storage [IO: ▲6.17MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 248 new files
Database: no new tables, 9 new options
New WordPress options |
---|
fs_debug_mode |
widget_theysaidso_widget |
db_upgraded |
widget_recent-comments |
fs_active_plugins |
widget_recent-posts |
fs_accounts |
can_compress_scripts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for Restrict - membership, site, content and user access restrictions for WordPress
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,874 ▲139 | 13.36 ▼1.01 | 1.71 ▼0.29 | 32.67 ▼10.85 |
Dashboard /wp-admin | 2,252 ▲61 | 4.93 ▲0.03 | 114.40 ▲7.81 | 60.73 ▲20.38 |
Posts /wp-admin/edit.php | 2,141 ▲52 | 2.15 ▲0.16 | 41.52 ▲4.20 | 53.21 ▲16.31 |
Add New Post /wp-admin/post-new.php | 6,585 ▲5,061 | 20.37 ▼2.92 | 931.30 ▲322.24 | 74.88 ▲24.27 |
Media Library /wp-admin/upload.php | 1,434 ▲46 | 4.37 ▲0.17 | 102.35 ▲3.77 | 55.99 ▲13.46 |
Freemius Debug [v.2.5.10] /wp-admin/admin.php?page=freemius | 1,115 | 1.84 | 28.24 | 42.42 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/restricted-content/freemius/includes/class-freemius.php+8486
Undefined property: stdClass::$plugins
- This plugin did not uninstall successfully, leaving 9 options in the database
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- fs_debug_mode
- widget_recent-comments
- theysaidso_admin_options
- fs_accounts
- fs_active_plugins
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
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
- 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/restricted-content/includes/freeaddons/simple-urls.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restricted-content/includes/freeaddons/siteorigin-integration.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_reset_vars() in wp-content/plugins/restricted-content/includes/settings/settings.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/restricted-content/includes/freeaddons/comments.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function restrict_fs() in wp-content/plugins/restricted-content/includes/settings/welcome-page.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function rsc_iw_is_wl() in wp-content/plugins/restricted-content/includes/settings/settings-general.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/restricted-content/includes/freeaddons/woocommerce-shop-page.php:5
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side
Optimizations
Plugin configuration 79% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: protect content, restricted content, restrict content, restrict access, restrict site
restricted-content/index.php 54% from 13 tests
The main file in "Restrict - membership, site, content and user access restrictions for WordPress" v. 2.2.5 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
- Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
- Domain Path: The domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("languages")
- Description: Please don't use more than 140 characters for the plugin description (currently 247 characters long)
- Domain Path: Please prefix the domain path with a forward slash character ("/languages")
- Main file name: Name the main plugin file the same as the plugin slug ("restricted-content.php" instead of "index.php")
- Plugin Name: A shorter plugin name is better (currently 79 characters long instead of max. 70)
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected55,437 lines of code in 166 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 130 | 8,488 | 17,619 | 37,142 |
PO File | 12 | 6,960 | 8,455 | 15,240 |
CSS | 16 | 316 | 32 | 1,846 |
JavaScript | 6 | 138 | 83 | 751 |
SVG | 2 | 134 | 1 | 458 |
PHP code 50% from 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
- Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 3,073)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 96.90 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3,073.00 |
Average method complexity | 4.81 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 94.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 51 | |
▷ Abstract classes | 2 | 3.92% |
▷ Concrete classes | 49 | 96.08% |
▷ Final classes | 0 | 0.00% |
Methods | 1,311 | |
▷ Static methods | 228 | 17.39% |
▷ Public methods | 922 | 70.33% |
▷ Protected methods | 17 | 1.30% |
▷ Private methods | 372 | 28.38% |
Functions | 131 | |
▷ Named functions | 131 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 146 | |
▷ Global constants | 99 | 67.81% |
▷ Class constants | 47 | 32.19% |
▷ Public constants | 47 | 100.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
35 PNG files occupy 1.53MB with 1.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/images/restrict-categories.png | 27.95KB | 8.66KB | ▼ 69.01% |
assets/images/restrict-login.png | 30.98KB | 11.14KB | ▼ 64.04% |
assets/images/restrict-part@2x.png | 125.84KB | 28.51KB | ▼ 77.35% |
assets/images/general-header@2x.png | 231.07KB | 70.05KB | ▼ 69.69% |
assets/images/restrict-widget.png | 32.24KB | 11.21KB | ▼ 65.23% |