Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼2.01ms] Passed 4 tests
Server-side resources used by Page Restrict for WooCommerce
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 41.61 ▲2.86 |
Dashboard /wp-admin | 3.31 ▲0.00 | 50.66 ▼1.29 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 59.47 ▲5.69 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 93.39 ▼7.49 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 34.22 ▼2.11 |
Server storage [IO: ▲2.51MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 176 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
A check of browser resources used by Page Restrict for WooCommerce
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,815 ▲54 | 14.48 ▲0.11 | 1.82 ▲0.09 | 44.76 ▲3.85 |
Dashboard /wp-admin | 2,218 ▲12 | 5.83 ▼0.20 | 99.30 ▼3.32 | 39.07 ▼1.28 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 1.99 ▲0.02 | 41.57 ▲1.21 | 35.58 ▲0.04 |
Add New Post /wp-admin/post-new.php | 1,559 ▲5 | 18.30 ▲0.14 | 605.78 ▼26.44 | 50.56 ▼11.52 |
Media Library /wp-admin/upload.php | 1,403 ▲3 | 4.17 ▼0.07 | 101.31 ▼10.37 | 47.69 ▼0.18 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test
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 take a closer look at the following
- 2× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/page-restrict-for-woocommerce/admin/partials/menu-pages/quick_start/tabs/tab-add-restrict-doc-loop.php
- > /wp-content/plugins/page-restrict-for-woocommerce/front/partials/display.php
- 47× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Notice
Undefined variable: logo in wp-content/plugins/page-restrict-for-woocommerce/admin/partials/menu-page-pages.php on line 16
- > PHP Notice
Undefined variable: prwc_limit_downloadable_products in wp-content/plugins/page-restrict-for-woocommerce/admin/partials/menu-pages/pages/pages-vars.php on line 31
- > PHP Warning
count(): Parameter must be an array or an object that implements Countable in wp-content/plugins/page-restrict-for-woocommerce/admin/partials/menu-pages/quick_start/tabs/tab-add-restrict-doc-loop.php on line 2
- > PHP Warning
Use of undefined constant PAGE_RESTRICT_WC_LOCATION_URL - assumed 'PAGE_RESTRICT_WC_LOCATION_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-restrict-for-woocommerce/admin/partials/menu-pages/quick_start/tabs/tab-add-restrict-frontend.php on line 22
- > PHP Notice
Undefined variable: value in wp-content/plugins/page-restrict-for-woocommerce/admin/partials/menu-pages/pages/pages-page.php on line 24
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/page-restrict-for-woocommerce/admin/partials/menu-pages/pages/pages-page.php:32
- > PHP Warning
Use of undefined constant PAGE_RESTRICT_WC_LOCATION_URL - assumed 'PAGE_RESTRICT_WC_LOCATION_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-restrict-for-woocommerce/admin/partials/menu-pages/quick_start/tabs/tab-add-restrict-general-overview.php on line 22
- > PHP Notice
Undefined variable: redirect_prod_not_bought_id in wp-content/plugins/page-restrict-for-woocommerce/admin/partials/menu-pages/pages/pages-page.php on line 26
- > PHP Warning
Use of undefined constant PAGE_RESTRICT_WC_LOCATION_URL - assumed 'PAGE_RESTRICT_WC_LOCATION_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/page-restrict-for-woocommerce/admin/partials/menu-pages/quick_start/tabs/tab-add-page-restrict-classic.php on line 22
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/page-restrict-for-woocommerce/admin/partials/menu-pages/user_overview/tabs/tab-timeout.php:42
- > PHP Notice
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
- Screenshots: These screenshots need descriptions #10, #11, #12, #13, #2, #3, #4, #5, #6, #7, #8, #9 in page-restrict-for-woocommerce/assets to your readme.txt
page-restrict-for-woocommerce/page-restrict-wc.php 77% from 13 tests
The main file in "Page Restrict for WooCommerce" v. 1.6.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: The text domain name should consist of only dashes and lowercase characters
- Requires at least: The required version number must match the one declared in readme.txt ("4.8.12" instead of "3.0.0")
- Main file name: Name the main plugin file the same as the plugin slug ("page-restrict-for-woocommerce.php" instead of "page-restrict-wc.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin12,821 lines of code in 112 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 54 | 283 | 1,937 | 5,068 |
CSS | 11 | 631 | 97 | 2,497 |
JavaScript | 26 | 45 | 239 | 2,193 |
SVG | 5 | 0 | 0 | 1,328 |
Sass | 6 | 139 | 3 | 705 |
PO File | 1 | 267 | 462 | 548 |
JSON | 9 | 0 | 0 | 482 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.28 |
Average class complexity | 20.05 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 83.00 |
Average method complexity | 4.06 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 31.00 |
Code structure | ||
---|---|---|
Namespaces | 10 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 20 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 20 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 99 | |
▷ Static methods | 4 | 4.04% |
▷ Public methods | 92 | 92.93% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 7 | 7.07% |
Functions | 28 | |
▷ Named functions | 5 | 17.86% |
▷ Anonymous functions | 23 | 82.14% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 0% from 2 tests
Image compression 0% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
32 PNG files occupy 1.47MB with 1.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
(invalid) admin/assets/build/images/ui-icons_ffffff_256x240.69a45a43.png | 8.49KB | 0.00KB | ▼ 100.00% |
admin/assets/img/screenshots/en/section/products-sections-settings.png | 29.68KB | 8.39KB | ▼ 71.73% |
admin/assets/img/screenshots/en/frontend/restrict-pages-list-shortcode-block-edit.png | 94.98KB | 33.26KB | ▼ 64.99% |
(invalid) admin/assets/build/images/ui-icons_777620_256x240.69d91555.png | 6.13KB | 0.00KB | ▼ 100.00% |
admin/assets/img/screenshots/en/general-overview/user-page-restricted-time-data.png | 184.87KB | 64.59KB | ▼ 65.06% |