Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.00MB] [CPU: ▲0.22ms] Passed 4 tests
This is a short check of server-side resources used by Cost Of Goods
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.46 ▲0.00 | 46.49 ▲5.25 |
Dashboard /wp-admin | 3.31 ▲0.00 | 43.85 ▼8.45 |
Posts /wp-admin/edit.php | 3.36 ▲0.00 | 48.53 ▼0.57 |
Add New Post /wp-admin/post-new.php | 5.89 ▲0.00 | 137.18 ▲32.45 |
Media Library /wp-admin/upload.php | 3.23 ▲0.00 | 36.95 ▲4.67 |
Server storage [IO: ▲2.99MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
widget_recent-posts |
widget_recent-comments |
can_compress_scripts |
theysaidso_admin_options |
db_upgraded |
Browser metrics Passed 4 tests
An overview of browser requirements for Cost Of Goods
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,800 ▲43 | 13.22 ▼1.16 | 1.85 ▼0.51 | 43.14 ▼6.04 |
Dashboard /wp-admin | 2,206 ▲18 | 5.91 ▲0.10 | 108.84 ▲5.51 | 40.53 ▼1.66 |
Posts /wp-admin/edit.php | 2,089 ▼0 | 2.05 ▲0.06 | 44.29 ▲4.55 | 40.13 ▲1.08 |
Add New Post /wp-admin/post-new.php | 1,534 ▼8 | 23.05 ▲4.63 | 700.46 ▲80.43 | 60.93 ▲3.39 |
Media Library /wp-admin/upload.php | 1,388 ▲6 | 4.10 ▼0.08 | 99.26 ▼4.49 | 40.73 ▼2.84 |
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
These items require your attention
- Zombie WordPress options were found after uninstall: 6 options
- db_upgraded
- can_compress_scripts
- theysaidso_admin_options
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test
SRP 0% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
- 1× PHP files perform the task of outputting text when accessed with GET requests:
- > /wp-content/plugins/cost-of-goods/public/partials/cost-of-goods-for-woocommerce-public-display.php
- 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/cost-of-goods/includes/class-cost-of-goods-for-woocommerce.php:32
- > 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 90% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
- Screenshots: Add images for these screenshots: #1 (cod-screenshot-1.png), #2 (cod-screenshot-2.png), #3 (reports.png)
cost-of-goods/cost-of-goods-for-woocommerce.php 85% from 13 tests
The main PHP file in "Cost Of Goods" ver. 1.1.1 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("cost-of-goods.php" instead of "cost-of-goods-for-woocommerce.php")
- Requires at least: The required version number must match the one declared in readme.txt ("4.7" instead of "3.0.0")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected10,474 lines of code in 19 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JSON | 2 | 0 | 0 | 9,816 |
PHP | 13 | 138 | 495 | 596 |
JavaScript | 2 | 15 | 29 | 62 |
CSS | 2 | 0 | 8 | 0 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.32 |
Average class complexity | 3.14 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 13.00 |
Average method complexity | 1.44 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.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 | 34 | |
▷ Static methods | 3 | 8.82% |
▷ Public methods | 29 | 85.29% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 14.71% |
Functions | 3 | |
▷ Named functions | 3 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 1 | |
▷ Global constants | 1 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 2.55MB with 1.78MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin/partials/img/b.png | 118.21KB | 49.99KB | ▼ 57.71% |
admin/partials/img/dashboard.png | 260.49KB | 65.23KB | ▼ 74.96% |
admin/partials/img/cog-variations.png | 2,163.44KB | 433.48KB | ▼ 79.96% |
admin/partials/img/a.png | 73.54KB | 24.48KB | ▼ 66.71% |