Benchmarks
Plugin footprint 82% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲1.56MB] [CPU: ▲7.96ms] 75% from 4 tests
Server-side resources used by Swatchly – WooCommerce Variation Swatches for Products (product attributes: Image swatch, Color swatches, Label swatches)
Please fix the following
- CPU: Try to keep total CPU usage under 500.00ms (currently 2,223.89ms on /wp-admin/admin.php?page=swatchly_recommendations)
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 4.95 ▲1.49 | 46.76 ▲5.00 |
Dashboard /wp-admin | 4.89 ▲1.59 | 60.42 ▲8.90 |
Posts /wp-admin/edit.php | 4.94 ▲1.58 | 65.46 ▲16.53 |
Add New Post /wp-admin/post-new.php | 7.48 ▲1.58 | 104.81 ▲1.42 |
Media Library /wp-admin/upload.php | 4.82 ▲1.58 | 52.77 ▲16.67 |
Recommendations /wp-admin/admin.php?page=swatchly_recommendations | 9.10 | 2,223.89 |
Server storage [IO: ▲1.45MB] [DB: ▲0.70MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 163 new files
Database: no new tables, 8 new options
New WordPress options |
---|
swatchly_version |
swatchly_installed |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
widget_recent-posts |
Browser metrics Passed 4 tests
Checking browser requirements for Swatchly – WooCommerce Variation Swatches for Products (product attributes: Image swatch, Color swatches, Label swatches)
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,822 ▲61 | 14.23 ▼0.03 | 1.77 ▼0.13 | 40.95 ▼7.03 |
Dashboard /wp-admin | 2,200 ▲23 | 5.63 ▲0.03 | 87.44 ▼7.99 | 39.55 ▲1.15 |
Posts /wp-admin/edit.php | 2,108 ▲8 | 1.98 ▲0.03 | 39.48 ▲2.54 | 36.86 ▲5.18 |
Add New Post /wp-admin/post-new.php | 1,534 ▼1 | 23.89 ▲5.48 | 606.90 ▲3.92 | 46.07 ▼19.01 |
Media Library /wp-admin/upload.php | 1,408 ▲11 | 4.16 ▼0.04 | 100.05 ▼2.83 | 43.32 ▼1.01 |
Recommendations /wp-admin/admin.php?page=swatchly_recommendations | 2,872 | 2.17 | 26.26 | 40.86 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.70MB] 75% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- This plugin did not uninstall successfully, leaving 8 options in the database
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
- db_upgraded
- can_compress_scripts
- widget_recent-comments
- swatchly_version
- swatchly_installed
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
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 Swatchly\\Admin\\esc_html__() in wp-content/plugins/swatchly/includes/Admin/recommendations/Recommended_Plugins.php:71
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
- Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
swatchly/swatchly.php Passed 13 tests
"Swatchly – WooCommerce Variation Swatches for Products (product attributes: Image swatch, Color swatches, Label swatches)" version 1.2.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
43 characters long description:
Variation Swatches for WooCommerce Products
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 plugin26,450 lines of code in 136 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 100 | 3,119 | 1,930 | 11,478 |
JavaScript | 11 | 1,559 | 722 | 5,396 |
Sass | 15 | 952 | 3 | 4,811 |
CSS | 6 | 381 | 519 | 4,744 |
JSON | 2 | 0 | 0 | 19 |
SVG | 2 | 0 | 0 | 2 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.62 |
Average class complexity | 26.22 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 207.00 |
Average method complexity | 6.05 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 57.00 |
Code structure | ||
---|---|---|
Namespaces | 7 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 76 | |
▷ Abstract classes | 2 | 2.63% |
▷ Concrete classes | 74 | 97.37% |
▷ Final classes | 1 | 1.35% |
Methods | 350 | |
▷ Static methods | 65 | 18.57% |
▷ Public methods | 345 | 98.57% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 1.43% |
Functions | 39 | |
▷ Named functions | 34 | 87.18% |
▷ Anonymous functions | 5 | 12.82% |
Constants | 5 | |
▷ Global constants | 5 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
22 PNG files occupy 0.12MB with 0.11MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
(invalid) includes/Admin/recommendations/assets/images/extensions/wp-plugin-manager-pro.png | 13.31KB | 0.00KB | ▼ 100.00% |
(invalid) includes/Admin/recommendations/assets/images/extensions/ht-google-place-review.png | 2.64KB | 0.00KB | ▼ 100.00% |
includes/Admin/recommendations/assets/images/extensions/whols-pro.png | 15.30KB | 7.40KB | ▼ 51.65% |
assets/images/rounded.png | 2.08KB | 0.46KB | ▼ 78.03% |
(invalid) includes/Admin/recommendations/assets/images/extensions/docus-pro.png | 3.98KB | 0.00KB | ▼ 100.00% |