Benchmarks
Plugin footprint 23% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
- This plugin did not install gracefully
- > Notice in wp-content/plugins/woo-restrict-by-category/woocommerce-restrict-by-category-config.php+18
Constant WC_RESTRICT_BY_CATEGORY_URL already defined
Server metrics [RAM: ▼1.94MB] [CPU: ▼62.00ms] Passed 4 tests
An overview of server-side resources used by WooCommerce Restrict By Category
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.05 ▼1.41 | 4.72 ▼40.96 |
Dashboard /wp-admin | 2.07 ▼1.27 | 7.06 ▼58.00 |
Posts /wp-admin/edit.php | 2.07 ▼1.28 | 6.41 ▼51.23 |
Add New Post /wp-admin/post-new.php | 2.07 ▼3.81 | 6.27 ▼97.80 |
Media Library /wp-admin/upload.php | 2.07 ▼1.16 | 5.41 ▼32.54 |
Server storage [IO: ▲4.18MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 53 new files
Database: 1 new table, 8 new options
New tables |
---|
wp_rednao_wcrbc_privileges |
New WordPress options |
---|
WC_RESTRICT_BY_CATEGORY_DB_VERSION |
widget_recent-comments |
REDNAO_WCRBC_RESTRICTED_PRODUCT_PAGE_ID |
widget_recent-posts |
theysaidso_admin_options |
widget_theysaidso_widget |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
Checking browser requirements for WooCommerce Restrict By Category
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,809 ▲48 | 14.23 ▼0.13 | 1.68 ▼0.66 | 41.33 ▼3.23 |
Dashboard /wp-admin | 2,218 ▲41 | 5.59 ▼0.02 | 100.57 ▲7.64 | 80.68 ▲42.65 |
Posts /wp-admin/edit.php | 2,126 ▲26 | 1.99 ▼0.03 | 37.82 ▼2.78 | 34.75 ▼0.25 |
Add New Post /wp-admin/post-new.php | 1,567 ▲41 | 18.36 ▼4.73 | 659.10 ▲12.73 | 81.69 ▲18.78 |
Media Library /wp-admin/upload.php | 1,420 ▲20 | 4.11 ▼0.16 | 101.56 ▼5.05 | 72.19 ▲27.83 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 25% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- This plugin did not uninstall without warnings or errors
- > Notice in wp-content/plugins/woo-restrict-by-category/woocommerce-restrict-by-category-config.php+18
Constant WC_RESTRICT_BY_CATEGORY_URL already defined
- Zombie tables detected upon uninstall: 1 table
- wp_rednao_wcrbc_privileges
- This plugin did not uninstall successfully, leaving 8 options in the database
- widget_theysaidso_widget
- widget_recent-comments
- REDNAO_WCRBC_RESTRICTED_PRODUCT_PAGE_ID
- can_compress_scripts
- WC_RESTRICT_BY_CATEGORY_DB_VERSION
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
- 2× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/woo-restrict-by-category/woocommerce-restrict-by-category.php
- > /wp-content/plugins/woo-restrict-by-category/woocommerce-restrict-by-category-config.php
- 4× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/woo-restrict-by-category/screens/user_restriction.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function get_terms() in wp-content/plugins/woo-restrict-by-category/screens/roles_restriction.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-restrict-by-category/filter-manager.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/woo-restrict-by-category/ajax.php:2
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 93% 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: Screenshot #3 (Playing a recorded user) image not found
woo-restrict-by-category/woocommerce-restrict-by-category.php 92% from 13 tests
"WooCommerce Restrict By Category" version 1.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("woo-restrict-by-category.php" instead of "woocommerce-restrict-by-category.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
Success! There were no dangerous files found in this plugin7,035 lines of code in 34 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
SVG | 2 | 0 | 0 | 2,959 |
CSS | 7 | 63 | 23 | 2,781 |
JavaScript | 7 | 1 | 12 | 442 |
PHP | 7 | 84 | 44 | 423 |
TypeScript | 4 | 47 | 4 | 220 |
XML | 6 | 0 | 0 | 193 |
JSON | 1 | 0 | 0 | 17 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.35 |
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 | 17 | |
▷ Named functions | 16 | 94.12% |
▷ Anonymous functions | 1 | 5.88% |
Constants | 7 | |
▷ Global constants | 7 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected