Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors
Server metrics [RAM: ▲0.00MB] [CPU: ▼7.16ms] Passed 4 tests
A check of server-side resources used by Free Gift Product For Woocommerce
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 42.73 ▼4.59 |
Dashboard /wp-admin | 3.31 ▲0.00 | 45.22 ▼7.26 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 48.86 ▼1.96 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 82.79 ▼14.82 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 36.15 ▲2.85 |
Server storage [IO: ▲0.23MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-posts |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
Browser metrics Passed 4 tests
Free Gift Product For Woocommerce: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,846 ▲100 | 13.43 ▼0.93 | 1.94 ▲0.11 | 41.86 ▼0.41 |
Dashboard /wp-admin | 2,203 ▲18 | 5.83 ▼0.07 | 98.66 ▼16.03 | 38.70 ▼4.16 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.00 ▼0.02 | 39.59 ▲2.95 | 34.81 ▲0.55 |
Add New Post /wp-admin/post-new.php | 1,542 ▲9 | 18.20 ▼4.97 | 625.71 ▼47.47 | 54.53 ▼8.16 |
Media Library /wp-admin/upload.php | 1,391 ▲3 | 4.27 ▲0.09 | 96.56 ▼14.38 | 41.33 ▼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
It is recommended to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- db_upgraded
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-comments
- widget_theysaidso_widget
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
- 1× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/free-gifts-product-for-woocommerce/free-gifts-woocommerce.php
- 3× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/free-gifts-product-for-woocommerce/main/resources/free-gifts-installation-require.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/free-gifts-product-for-woocommerce/main/resources/free-gifts-load-js-css.php:4
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/free-gifts-product-for-woocommerce/main/resources/free-gifts-language.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected
Optimizations
Plugin configuration 86% 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
These attributes need to be fixed:
- Contributors: Plugin contributors field is missing
free-gifts-product-for-woocommerce/free-gifts-woocommerce.php 77% from 13 tests
"Free Gift Product For Woocommerce" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
- 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 points to a folder that does not exist ("/languages")
- Main file name: The principal plugin file should be the same as the plugin slug ("free-gifts-product-for-woocommerce.php" instead of "free-gifts-woocommerce.php")
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 detected4,467 lines of code in 17 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 4 | 626 | 1,154 | 2,675 |
PHP | 9 | 172 | 68 | 1,496 |
CSS | 4 | 8 | 16 | 296 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.38 |
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 | 35 | |
▷ Named functions | 35 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/js/owlcarousel/assets/owl.video.play.png | 4.86KB | 2.74KB | ▼ 43.61% |