Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully
Server metrics [RAM: ▲0.03MB] [CPU: ▼3.76ms] Passed 4 tests
This is a short check of server-side resources used by Category Restriction WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.03 | 40.52 ▲1.38 |
Dashboard /wp-admin | 3.33 ▲0.03 | 49.95 ▼4.46 |
Posts /wp-admin/edit.php | 3.39 ▲0.03 | 47.26 ▼1.14 |
Add New Post /wp-admin/post-new.php | 5.92 ▲0.03 | 83.65 ▼10.12 |
Media Library /wp-admin/upload.php | 3.26 ▲0.03 | 39.33 ▲0.69 |
Server storage [IO: ▲0.28MB] [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, 6 new options
New WordPress options |
---|
widget_recent-comments |
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Category Restriction WooCommerce
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲3 | 14.24 ▼0.11 | 1.80 ▼0.20 | 44.35 ▲2.85 |
Dashboard /wp-admin | 2,195 ▲18 | 5.62 ▼0.03 | 92.25 ▼0.69 | 41.19 ▲0.19 |
Posts /wp-admin/edit.php | 2,097 ▼3 | 1.94 ▼0.07 | 36.24 ▼0.15 | 33.80 ▼3.31 |
Add New Post /wp-admin/post-new.php | 1,537 ▲11 | 18.48 ▼4.99 | 618.95 ▼40.17 | 68.52 ▲16.72 |
Media Library /wp-admin/upload.php | 1,400 ▼0 | 4.16 ▼0.02 | 98.74 ▼15.58 | 45.24 ▼2.74 |
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
Please fix the following items
- This plugin did not uninstall successfully, leaving 6 options in the database
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
- widget_recent-comments
- theysaidso_admin_options
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test
SRP 50% 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 items
- 1× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/restrict-purchase-with-category/category_restriction_woocommerce.php:15
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
- Screenshots: Please add images for these screenshots: #1 (Dashboard page for settings), #2 (Dashboard page for editing a message to display on product pages), #3 (Thats how message look on shop / products page), #4 (Thats how message look on product page)
restrict-purchase-with-category/category_restriction_woocommerce.php 92% from 13 tests
The primary PHP file in "Category Restriction WooCommerce" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("restrict-purchase-with-category.php" instead of "category_restriction_woocommerce.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin273 lines of code in 2 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 1 | 110 | 18 | 249 |
JavaScript | 1 | 5 | 1 | 24 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.25 |
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 | 10 | |
▷ Named functions | 10 | 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 Passed 2 tests
Image compression Passed 2 tests
PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.26MB with 0.16MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
screenshot-1.png | 71.31KB | 29.02KB | ▼ 59.30% |
screenshot-2.png | 54.21KB | 21.25KB | ▼ 60.81% |
screenshot-4.png | 69.00KB | 24.63KB | ▼ 64.30% |
screenshot-3.png | 73.26KB | 25.74KB | ▼ 64.86% |