Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.01MB] [CPU: ▼1.86ms] Passed 4 tests
Analyzing server-side resources used by Points and Rewards for WooCommerce by WPLoyalty - Create WooCommerce Loyalty Programs, Referral Programs and Customer Rewards System
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.47 ▲0.01 | 38.45 ▲1.97 |
Dashboard /wp-admin | 3.31 ▲0.01 | 46.27 ▲2.25 |
Posts /wp-admin/edit.php | 3.36 ▲0.01 | 42.65 ▼3.52 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.01 | 79.71 ▼6.85 |
Media Library /wp-admin/upload.php | 3.24 ▲0.01 | 33.63 ▲0.98 |
Server storage [IO: ▲4.83MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
This plugin was installed successfully
Filesystem: 252 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
Browser metrics Passed 4 tests
A check of browser resources used by Points and Rewards for WooCommerce by WPLoyalty - Create WooCommerce Loyalty Programs, Referral Programs and Customer Rewards System
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,789 ▲28 | 14.39 ▲0.04 | 1.86 ▼0.07 | 43.73 ▼2.86 |
Dashboard /wp-admin | 2,198 ▲21 | 5.63 ▼0.02 | 93.55 ▲4.53 | 44.49 ▲5.21 |
Posts /wp-admin/edit.php | 2,100 ▼0 | 2.03 ▲0.02 | 36.27 ▲0.47 | 31.22 ▼6.64 |
Add New Post /wp-admin/post-new.php | 1,526 ▼2 | 23.05 ▲0.02 | 687.63 ▼5.02 | 73.75 ▲18.64 |
Media Library /wp-admin/upload.php | 1,403 ▲3 | 4.18 ▼0.01 | 93.74 ▼1.73 | 39.45 ▼2.12 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- widget_theysaidso_widget
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Class 'ParseCsv\\enums\\AbstractEnum' not found in wp-content/plugins/wployalty/vendor/parsecsv/php-parsecsv/src/enums/DatatypeEnum.php:12
- > PHP Fatal error
Trait 'ParseCsv\\extensions\\DatatypeTrait' not found in wp-content/plugins/wployalty/vendor/parsecsv/php-parsecsv/src/Csv.php on line 10
- > PHP Fatal error
Uncaught Error: Class 'ParseCsv\\enums\\AbstractEnum' not found in wp-content/plugins/wployalty/vendor/parsecsv/php-parsecsv/src/enums/SortEnum.php:6
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected
Optimizations
Plugin configuration 86% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
- Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
wployalty/wp-loyalty-rules-lite.php 77% from 13 tests
"Points and Rewards for WooCommerce by WPLoyalty - Create WooCommerce Loyalty Programs, Referral Programs and Customer Rewards System" version 1.2.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
- Description: The description should be shorter than 140 characters (currently 144 characters long)
- Main file name: Name the main plugin file the same as the plugin slug ("wployalty.php" instead of "wp-loyalty-rules-lite.php")
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
Code Analysis 97% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin39,883 lines of code in 235 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 161 | 2,178 | 4,751 | 30,528 |
JavaScript | 45 | 318 | 1,260 | 3,048 |
CSS | 11 | 363 | 45 | 2,974 |
Sass | 2 | 344 | 0 | 1,481 |
Markdown | 2 | 252 | 0 | 1,348 |
SVG | 12 | 0 | 0 | 320 |
JSON | 1 | 0 | 0 | 175 |
HTML | 1 | 1 | 0 | 9 |
PHP code 50% from 2 tests
This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
- Cyclomatic complexity of methods has to be reduced to less than 100 (currently 112)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.71 |
Average class complexity | 72.98 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 376.00 |
Average method complexity | 6.90 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 112.00 |
Code structure | ||
---|---|---|
Namespaces | 26 | |
Interfaces | 0 | |
Traits | 2 | |
Classes | 87 | |
▷ Abstract classes | 4 | 4.60% |
▷ Concrete classes | 83 | 95.40% |
▷ Final classes | 0 | 0.00% |
Methods | 1,095 | |
▷ Static methods | 99 | 9.04% |
▷ Public methods | 948 | 86.58% |
▷ Protected methods | 134 | 12.24% |
▷ Private methods | 13 | 1.19% |
Functions | 21 | |
▷ Named functions | 5 | 23.81% |
▷ Anonymous functions | 16 | 76.19% |
Constants | 52 | |
▷ Global constants | 35 | 67.31% |
▷ Class constants | 17 | 32.69% |
▷ Public constants | 17 | 100.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
4 compressed PNG files occupy 0.02MB
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
Assets/Site/image/default-level.png | 12.27KB | 11.46KB | ▼ 6.58% |
Assets/Site/image/redeemed_points.png | 1.17KB | 1.09KB | ▼ 6.76% |
Assets/Site/image/Hand-min.png | 1.19KB | 1.17KB | ▼ 1.72% |
App/Apps/Launcher/V2/Assets/images/logo.png | 2.33KB | 1.76KB | ▼ 24.11% |