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
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.00MB] [CPU: ▼3.48ms] Passed 4 tests
Server-side resources used by Product Cost Price
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 37.29 ▼1.11 |
Dashboard /wp-admin | 3.31 ▲0.00 | 50.85 ▲2.26 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 47.09 ▼4.62 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 82.71 ▼10.46 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 38.51 ▲5.91 |
Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options |
---|
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
db_upgraded |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Product Cost Price
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲65 | 14.48 ▼0.07 | 1.79 ▼0.02 | 44.05 ▲2.95 |
Dashboard /wp-admin | 2,206 ▲15 | 4.84 ▼1.06 | 104.55 ▲3.69 | 43.44 ▲1.91 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.00 ▼0.04 | 33.53 ▼3.73 | 33.15 ▼0.85 |
Add New Post /wp-admin/post-new.php | 1,514 ▼0 | 17.71 ▲0.16 | 666.75 ▼34.91 | 62.37 ▲2.52 |
Media Library /wp-admin/upload.php | 1,382 ▼6 | 4.27 ▲0.07 | 99.18 ▼1.26 | 43.99 ▲0.57 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- can_compress_scripts
- widget_recent-comments
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- widget_recent-posts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
- 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/product-cost-price/functions/add-profit-tab.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/product-cost-price/product_cost_price.php:11
- > PHP Warning
include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/product-cost-price/product_cost_price.php on line 10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-cost-price/functions/product-page-options.php:30
- > PHP Warning
include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/product-cost-price/product_cost_price.php on line 10
- > PHP Fatal error
Uncaught Error: Call to undefined function add_action() in wp-content/plugins/product-cost-price/functions/order-options.php:5
- > PHP Warning
Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/product-cost-price/product_cost_price.php on line 10
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found
Optimizations
Plugin configuration 93% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: price, cost, profit, report, product
product-cost-price/product_cost_price.php 85% from 13 tests
The entry point to "Product Cost Price" version 1.1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("product-cost-price.php" instead of "product_cost_price.php")
- Domain Path: The domain path folder was not found ("/languages/")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin1,718 lines of code in 11 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 399 | 311 | 1,715 |
CSS | 1 | 0 | 0 | 3 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.24 |
Average class complexity | 12.50 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 24.00 |
Average method complexity | 2.44 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 6 | |
▷ Abstract classes | 1 | 16.67% |
▷ Concrete classes | 5 | 83.33% |
▷ Final classes | 0 | 0.00% |
Methods | 48 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 39 | 81.25% |
▷ Protected methods | 9 | 18.75% |
▷ Private methods | 0 | 0.00% |
Functions | 16 | |
▷ Named functions | 16 | 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 are no PNG files in this plugin