Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▼0.01MB] [CPU: ▼11.20ms] Passed 4 tests
Analyzing server-side resources used by Woo Admin Filter By Stock
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 40.63 ▼9.23 |
Dashboard /wp-admin | 3.31 ▼0.04 | 47.59 ▼18.48 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 52.74 ▲2.26 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 89.50 ▼12.18 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 32.34 ▼4.89 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_recent-comments |
can_compress_scripts |
widget_theysaidso_widget |
theysaidso_admin_options |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Woo Admin Filter By Stock
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.22 ▼1.45 | 1.69 ▼0.14 | 42.84 ▼4.25 |
Dashboard /wp-admin | 2,206 ▲18 | 5.94 ▲0.06 | 106.23 ▼0.60 | 39.86 ▲0.64 |
Posts /wp-admin/edit.php | 2,086 ▼3 | 1.99 ▼0.02 | 38.23 ▼0.01 | 34.72 ▲0.69 |
Add New Post /wp-admin/post-new.php | 1,519 ▲5 | 22.98 ▲5.42 | 664.33 ▲1.36 | 51.13 ▼7.45 |
Media Library /wp-admin/upload.php | 1,379 ▼6 | 4.18 ▲0.04 | 99.50 ▼7.71 | 42.60 ▼2.14 |
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
It is recommended to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- widget_recent-posts
- can_compress_scripts
- widget_theysaidso_widget
- theysaidso_admin_options
- db_upgraded
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested
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
The following issues need your attention
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function Com\\ExtremeIdea\\Woocommerce\\AdminFilterByStock\\add_action() in wp-content/plugins/woo-admin-filter-by-stock/woo-admin-filter-by-stock.php:30
- > 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)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: filter products by stock q-ty
woo-admin-filter-by-stock/woo-admin-filter-by-stock.php Passed 13 tests
The main PHP script in "Woo Admin Filter By Stock" version 1.0.6 is automatically included on every request by WordPress
45 characters long description:
Plugin helps you to filter products by stock.
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected422 lines of code in 12 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 92 | 221 | 396 |
Markdown | 2 | 13 | 0 | 16 |
JSON | 2 | 0 | 0 | 10 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.47 |
Average class complexity | 16.25 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 44.00 |
Average method complexity | 3.10 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 18.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 30 | |
▷ Static methods | 5 | 16.67% |
▷ Public methods | 27 | 90.00% |
▷ Protected methods | 1 | 3.33% |
▷ Private methods | 2 | 6.67% |
Functions | 2 | |
▷ Named functions | 1 | 50.00% |
▷ Anonymous functions | 1 | 50.00% |
Constants | 2 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 2 | 100.00% |
▷ Public constants | 2 | 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
No PNG files were detected