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
Install script ran successfully
Server metrics [RAM: ▲0.00MB] [CPU: ▼4.55ms] Passed 4 tests
Server-side resources used by In Stock Mailer for WooCommerce
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 35.62 ▼8.15 |
Dashboard /wp-admin | 3.31 ▲0.00 | 48.30 ▼7.88 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 50.87 ▲0.86 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 92.64 ▼3.02 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 37.19 ▲0.94 |
Server storage [IO: ▲6.15MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 538 new files
Database: no new tables, 6 new options
New WordPress options |
---|
theysaidso_admin_options |
widget_recent-posts |
widget_theysaidso_widget |
widget_recent-comments |
can_compress_scripts |
db_upgraded |
Browser metrics Passed 4 tests
In Stock Mailer for WooCommerce: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,815 ▲54 | 13.28 ▼1.24 | 1.63 ▼0.54 | 39.81 ▼5.70 |
Dashboard /wp-admin | 2,224 ▲21 | 5.85 ▲0.03 | 101.23 ▼3.45 | 40.45 ▼6.52 |
Posts /wp-admin/edit.php | 2,103 ▲3 | 2.05 ▲0.05 | 38.58 ▲0.68 | 35.23 ▼1.60 |
Add New Post /wp-admin/post-new.php | 1,536 ▲10 | 23.21 ▲5.56 | 615.66 ▼67.69 | 52.14 ▼10.40 |
Media Library /wp-admin/upload.php | 1,394 ▼3 | 4.18 ▼0.08 | 100.53 ▼13.75 | 42.08 ▼4.81 |
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
The following items require your attention
- This plugin does not fully uninstall, leaving 6 options in the database
- widget_recent-posts
- db_upgraded
- widget_theysaidso_widget
- theysaidso_admin_options
- can_compress_scripts
- 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)
Even though no errors were found, this is by no means 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 take a closer look at the following
- 205× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Ramsey\\Uuid\\Test\\TestCase' not found in wp-content/plugins/in-stock-mailer-for-woocommerce/vendor/ramsey/uuid/tests/Provider/Time/SystemTimeProviderTest.php:9
- > PHP Fatal error
Cannot declare class AssertionError, because the name is already in use in wp-content/plugins/in-stock-mailer-for-woocommerce/vendor/symfony/polyfill-php70/Resources/stubs/AssertionError.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Tests\\Psr7\\BaseTest' not found in wp-content/plugins/in-stock-mailer-for-woocommerce/vendor/guzzlehttp/psr7/tests/MimeTypeTest.php:7
- > PHP Fatal error
Cannot declare class Error, because the name is already in use in wp-content/plugins/in-stock-mailer-for-woocommerce/vendor/symfony/polyfill-php70/Resources/stubs/Error.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Promise\\RejectionException' not found in wp-content/plugins/in-stock-mailer-for-woocommerce/vendor/guzzlehttp/promises/src/AggregateException.php:8
- > PHP Fatal error
Uncaught Error: Interface 'Ramsey\\Uuid\\Converter\\TimeConverterInterface' not found in wp-content/plugins/in-stock-mailer-for-woocommerce/vendor/ramsey/uuid/src/Converter/Time/DegradedTimeConverter.php:25
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Tests\\Psr7\\BaseTest' not found in wp-content/plugins/in-stock-mailer-for-woocommerce/vendor/guzzlehttp/psr7/tests/BufferStreamTest.php:7
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/in-stock-mailer-for-woocommerce/vendor/guzzlehttp/promises/tests/FulfilledPromiseTest.php:13
- > PHP Fatal error
Uncaught Error: Class 'GuzzleHttp\\Promise\\Tests\\Thennable' not found in wp-content/plugins/in-stock-mailer-for-woocommerce/vendor/guzzlehttp/promises/tests/NotPromiseInstance.php:8
- > PHP Fatal error
Uncaught Error: Class 'MailchimpMarketing\\Configuration' not found in wp-content/plugins/in-stock-mailer-for-woocommerce/vendor/mailchimp/marketing/lib/ApiClient.php:7
- > 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)
There were no browser issues found
Optimizations
Plugin configuration 83% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
- Screenshots: Please add descriptions for these screenshots #2, #3, #4, #5 in in-stock-mailer-for-woocommerce/assets to your readme.txt
in-stock-mailer-for-woocommerce/in-stock-mailer-for-wc.php 69% from 13 tests
The primary PHP file in "In Stock Mailer for WooCommerce" version 2.1.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
- Requires at least: Required version must be the same as the one declared in readme.txt ("4.9" instead of "3.5")
- Git Repository: Please remove the Git repository from this plugin
- Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("in-stock-mailer-for-woocommerce.php" instead of "in-stock-mailer-for-wc.php")
Code Analysis 95% from 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin101,117 lines of code in 480 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 350 | 12,088 | 13,462 | 82,782 |
Markdown | 32 | 1,591 | 0 | 4,760 |
CSS | 5 | 168 | 121 | 3,177 |
SVG | 1 | 0 | 0 | 2,671 |
Sass | 14 | 34 | 34 | 1,768 |
LESS | 14 | 34 | 44 | 1,758 |
JSON | 15 | 0 | 0 | 1,385 |
reStructuredText | 9 | 865 | 1,088 | 1,138 |
JavaScript | 5 | 134 | 87 | 815 |
YAML | 10 | 52 | 0 | 295 |
make | 5 | 56 | 11 | 226 |
XML | 7 | 1 | 0 | 129 |
Bourne Shell | 9 | 43 | 31 | 115 |
Python | 2 | 57 | 114 | 66 |
Dockerfile | 2 | 11 | 0 | 32 |
PHP code 0% from 2 tests
Analyzing cyclomatic complexity and code structure
These items need your attention
- Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,890)
- Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 31.74 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 1,890.00 |
Average method complexity | 4.31 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 179.00 |
Code structure | ||
---|---|---|
Namespaces | 46 | |
Interfaces | 27 | |
Traits | 4 | |
Classes | 272 | |
▷ Abstract classes | 1 | 0.37% |
▷ Concrete classes | 271 | 99.63% |
▷ Final classes | 28 | 10.33% |
Methods | 3,133 | |
▷ Static methods | 224 | 7.15% |
▷ Public methods | 2,645 | 84.42% |
▷ Protected methods | 327 | 10.44% |
▷ Private methods | 161 | 5.14% |
Functions | 607 | |
▷ Named functions | 128 | 21.09% |
▷ Anonymous functions | 479 | 78.91% |
Constants | 197 | |
▷ Global constants | 53 | 26.90% |
▷ Class constants | 144 | 73.10% |
▷ Public constants | 144 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.79MB with 0.50MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/img/isa-inline-logo.png | 247.47KB | 69.30KB | ▼ 72.00% |
assets/img/mchimp-no-consent.png | 16.42KB | 8.10KB | ▼ 50.67% |
assets/img/mchimp-chimped.png | 12.18KB | 5.02KB | ▼ 58.79% |
includes/options/img/isa-inline-logo.png | 190.93KB | 60.24KB | ▼ 68.45% |
includes/options/img/banner-772x250.png | 44.52KB | 14.24KB | ▼ 68.02% |