Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
- Install procedure had errors
- > Notice in wp-content/plugins/wp-stock-sync/wp-stock-sync.php+74
Trying to access array offset on value of type bool
Server metrics [RAM: ▼1.82MB] [CPU: ▼193.10ms] Passed 4 tests
A check of server-side resources used by Wp Stock Sync
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 1.82 ▼0.90 | 5.22 ▼15.67 |
Dashboard /wp-admin | 1.83 ▼1.22 | 6.03 ▼50.91 |
Posts /wp-admin/edit.php | 1.84 ▼1.27 | 5.94 ▼30.69 |
Add New Post /wp-admin/post-new.php | 1.84 ▼3.60 | 6.59 ▼659.60 |
Media Library /wp-admin/upload.php | 1.84 ▼1.17 | 6.64 ▼31.18 |
WP Stock Sync /wp-admin/options-general.php?page=wp-stock-sync | 1.84 | 6.62 |
Server storage [IO: ▲0.05MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
Wp Stock Sync: an overview of browser usage
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,821 ▲225 | 16.25 ▲0.64 | 12.39 ▲0.95 | 45.73 ▼1.61 |
Dashboard /wp-admin | 2,982 ▲48 | 5.85 ▼0.16 | 142.27 ▼13.64 | 107.25 ▲0.00 |
Posts /wp-admin/edit.php | 2,748 ▲9 | 2.70 ▼0.02 | 69.81 ▼8.23 | 86.21 ▲0.38 |
Add New Post /wp-admin/post-new.php | 1,690 ▲7 | 18.80 ▲0.42 | 388.31 ▲14.31 | 108.49 ▲1.76 |
Media Library /wp-admin/upload.php | 1,816 ▲68 | 5.05 ▲0.06 | 162.70 ▲17.48 | 115.08 ▼2.02 |
WP Stock Sync /wp-admin/options-general.php?page=wp-stock-sync | 1,040 | 2.36 | 60.41 | 74.37 |
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
These items require your attention
- The plugin did not uninstall gracefully
- > Notice in wp-content/plugins/wp-stock-sync/wp-stock-sync.php+74
Trying to access array offset on value of type bool
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
- 3 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=wp-stock-sync
- > POST request to /wp-admin/admin-ajax.php
- > Notice in wp-content/plugins/wp-stock-sync/wp-stock-sync.php+74
Trying to access array offset on value of type bool
SRP 0% 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
Almost there! Just fix the following items
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/wp-stock-sync/public/partials/wp-stock-sync-public-display.php
- 1× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-stock-sync/admin/partials/wp-stock-sync-admin-display.php:25
- > 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 Passed 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
6 plugin tags: stock, out of stock, inventory, woocommerce, in stock...
wp-stock-sync/wp-stock-sync.php Passed 13 tests
The principal PHP file in "Wp Stock Sync" v. 1.0.0 is loaded by WordPress automatically on each request
97 characters long description:
A plugin for woocommerce that sums the variation stock and stores that value as the parent 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
There were no executable files found in this plugin292 lines of code in 16 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 12 | 175 | 565 | 286 |
JavaScript | 2 | 4 | 54 | 6 |
CSS | 2 | 0 | 8 | 0 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.11 |
Average class complexity | 1.57 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 3.00 |
Average method complexity | 1.14 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 3.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 28 | |
▷ Static methods | 2 | 7.14% |
▷ Public methods | 23 | 82.14% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 17.86% |
Functions | 6 | |
▷ Named functions | 6 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin