Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully
Server metrics [RAM: ▲0.02MB] [CPU: ▼8.03ms] Passed 4 tests
This is a short check of server-side resources used by Inventory History
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.49 ▲0.02 | 31.16 ▼9.31 |
Dashboard /wp-admin | 3.33 ▲0.03 | 41.82 ▼6.43 |
Posts /wp-admin/edit.php | 3.38 ▲0.02 | 46.02 ▲5.01 |
Add New Post /wp-admin/post-new.php | 5.91 ▲0.02 | 75.00 ▼19.80 |
Media Library /wp-admin/upload.php | 3.25 ▲0.02 | 33.63 ▲3.41 |
Server storage [IO: ▲0.03MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 8 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_wc_inventory_history |
New WordPress options |
---|
db_upgraded |
widget_recent-posts |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
WCIH_version |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Inventory History
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲54 | 13.26 ▼1.36 | 1.59 ▼0.18 | 39.64 ▼4.35 |
Dashboard /wp-admin | 2,206 ▲15 | 4.86 ▲0.01 | 113.60 ▲8.60 | 42.62 ▲3.73 |
Posts /wp-admin/edit.php | 2,086 ▼3 | 2.06 ▲0.05 | 40.00 ▲0.77 | 36.11 ▼2.69 |
Add New Post /wp-admin/post-new.php | 1,534 ▼8 | 22.72 ▲4.62 | 639.65 ▲13.08 | 55.63 ▼12.44 |
Media Library /wp-admin/upload.php | 1,388 ▲3 | 4.20 ▼0.01 | 95.13 ▼22.89 | 41.67 ▼9.18 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- The plugin did not uninstall successfully, leaving 1 table in the database
- wp_wc_inventory_history
- The uninstall procedure has failed, leaving 7 options in the database
- WCIH_version
- widget_recent-posts
- theysaidso_admin_options
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_theysaidso_widget
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test
SRP Passed 2 tests
🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 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
4 plugin tags: stock history, woocommerce, stock log, products
inventory-history/wc-inventory-history.php 85% from 13 tests
The principal PHP file in "Inventory History" v. 0.1.2 is loaded by WordPress automatically on each request
The following require your attention:
- Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
- Main file name: Name the main plugin file the same as the plugin slug ("inventory-history.php" instead of "wc-inventory-history.php")
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 detected808 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 7 | 165 | 172 | 808 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.34 |
Average class complexity | 15.17 |
▷ Minimum class complexity | 6.00 |
▷ Maximum class complexity | 32.00 |
Average method complexity | 2.57 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 19.00 |
Code structure | ||
---|---|---|
Namespaces | 1 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 6 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 54 | |
▷ Static methods | 12 | 22.22% |
▷ Public methods | 46 | 85.19% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 8 | 14.81% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 2 | 100.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
No PNG images were found in this plugin