Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼7.24ms] Passed 4 tests
This is a short check of server-side resources used by Hide Add Cart If Already Purchased - WooCommerce
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.48 ▲0.02 | 36.71 ▼1.07 |
Dashboard /wp-admin | 3.31 ▲0.01 | 46.36 ▼1.22 |
Posts /wp-admin/edit.php | 3.37 ▲0.01 | 43.08 ▼6.64 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.03 | 80.50 ▼20.04 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 34.78 ▲3.75 |
Server storage [IO: ▲0.04MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
db_upgraded |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Hide Add Cart If Already Purchased - WooCommerce
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,912 ▲177 | 14.06 ▼0.23 | 7.77 ▲6.10 | 37.30 ▼7.03 |
Dashboard /wp-admin | 2,213 ▲25 | 4.87 ▼0.02 | 96.62 ▼16.58 | 39.91 ▼1.75 |
Posts /wp-admin/edit.php | 2,093 ▲4 | 2.00 ▲0.00 | 34.58 ▼6.10 | 32.78 ▼0.91 |
Add New Post /wp-admin/post-new.php | 1,518 ▼16 | 23.15 ▼0.03 | 653.75 ▼4.35 | 53.82 ▲0.66 |
Media Library /wp-admin/upload.php | 1,395 ▲7 | 4.16 ▼0.03 | 100.04 ▲4.05 | 42.37 ▼1.29 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- can_compress_scripts
- theysaidso_admin_options
- widget_theysaidso_widget
- widget_recent-posts
- db_upgraded
- widget_recent-comments
Smoke tests 75% 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 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 take a closer look at the following
- 2× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/hide-add-cart-if-already-purchased/admin/partials/hcap-admin-display.php
- > /wp-content/plugins/hide-add-cart-if-already-purchased/public/partials/hcap-public-display.php
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side
Optimizations
Plugin configuration 87% from 29 tests
readme.txt 88% 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:
- Donate link: Please fix this invalid URI: "wprashed.com"
- Screenshots: These screenshots require images: #1 (Setting Page), #2 (Product Archive Page), #3 (Single Product Page)
hide-add-cart-if-already-purchased/hcap.php 85% from 13 tests
The principal PHP file in "Hide Add Cart If Already Purchased - WooCommerce" v. 1.0.0 is loaded by WordPress automatically on each request
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("hide-add-cart-if-already-purchased.php" instead of "hcap.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
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
Good job! No executable or dangerous file extensions detected179 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 120 | 527 | 173 |
JavaScript | 2 | 4 | 54 | 6 |
CSS | 2 | 0 | 8 | 0 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.09 |
Average class complexity | 1.43 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3.00 |
Average method complexity | 1.13 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 23 | |
▷ Static methods | 2 | 8.70% |
▷ Public methods | 18 | 78.26% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 21.74% |
Functions | 4 | |
▷ Named functions | 4 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin