Benchmarks
Plugin footprint 58% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/offer-calc/includes/widgets/class-offer-calc-widget.php+26
Methods with the same name as their class will not be constructors in a future version of PHP; Offer_Calc_Widget has a deprecated constructor
Server metrics [RAM: ▲0.13MB] [CPU: ▲3.53ms] Passed 4 tests
An overview of server-side resources used by Offer Calc
This plugin has minimal impact on server resources
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.58 ▲0.12 | 39.18 ▲2.11 |
Dashboard /wp-admin | 3.43 ▲0.13 | 47.42 ▼2.57 |
Posts /wp-admin/edit.php | 3.55 ▲0.20 | 54.66 ▲7.36 |
Add New Post /wp-admin/post-new.php | 6.04 ▲0.16 | 106.11 ▲8.81 |
Media Library /wp-admin/upload.php | 3.36 ▲0.13 | 42.45 ▲7.20 |
Offer Calc Help /wp-admin/edit.php?post_type=offer-calc&page=offer-calc-help | 3.37 | 31.92 |
Offer Calc /wp-admin/edit.php?post_type=offer-calc | 3.40 | 41.71 |
Settings /wp-admin/edit.php?post_type=offer-calc&page=offer-calc-global-settings | 3.40 | 32.13 |
Add Offer /wp-admin/post-new.php?post_type=offer-calc | 3.46 | 54.87 |
Server storage [IO: ▲2.39MB] [DB: ▲0.07MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 77 new files
Database: no new tables, 10 new options
New WordPress options |
---|
can_compress_scripts |
ofc_version |
widget_recent-posts |
db_upgraded |
theysaidso_admin_options |
widget_theysaidso_widget |
ofc_migration_done |
widget_offer_calc_widget |
widget_recent-comments |
ofc_pro_notice |
Browser metrics Passed 4 tests
A check of browser resources used by Offer Calc
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,968 ▲207 | 13.50 ▼1.21 | 8.97 ▲7.39 | 39.14 ▼2.84 |
Dashboard /wp-admin | 2,285 ▲104 | 5.59 ▼0.03 | 84.73 ▼18.48 | 75.95 ▲35.03 |
Posts /wp-admin/edit.php | 2,154 ▲51 | 2.21 ▲0.19 | 56.40 ▲17.95 | 51.85 ▲19.12 |
Add New Post /wp-admin/post-new.php | 1,781 ▲255 | 21.50 ▼1.48 | 760.46 ▲130.74 | 30.90 ▼47.45 |
Media Library /wp-admin/upload.php | 1,440 ▲46 | 4.14 ▼0.04 | 123.97 ▲25.49 | 47.29 ▲3.05 |
Offer Calc Help /wp-admin/edit.php?post_type=offer-calc&page=offer-calc-help | 1,060 | 1.78 | 26.81 | 27.48 |
Offer Calc /wp-admin/edit.php?post_type=offer-calc | 1,145 | 2.16 | 37.57 | 33.90 |
Settings /wp-admin/edit.php?post_type=offer-calc&page=offer-calc-global-settings | 1,996 | 7.48 | 172.95 | 127.84 |
Add Offer /wp-admin/post-new.php?post_type=offer-calc | 2,521 | 7.92 | 176.31 | 203.34 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 75% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
- This plugin does not fully uninstall, leaving 10 options in the database
- widget_recent-posts
- widget_recent-comments
- widget_offer_calc_widget
- ofc_pro_notice
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
- ofc_migration_done
- ofc_version
Smoke tests 25% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These server-side errors were triggered
- > GET request to /wp-admin/edit.php?post_type=offer-calc&page=offer-calc-global-settings
- > User deprecated in wp-includes/functions.php+5463
Function screen_icon is deprecated since version 3.8.0 with no alternative available.
- > GET request to /wp-admin/edit.php?post_type=offer-calc&page=offer-calc-global-settings
- > User deprecated in wp-includes/functions.php+5463
Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
- 2 occurences, only the last one shown
- > GET request to /wp-admin/edit.php?post_type=offer-calc&page=offer-calc-global-settings
- > Notice in wp-content/plugins/offer-calc/offer-calc-pro/includes/admin/forms/offer-calc-global-setting.php+217
Trying to access array offset on value of type bool
- 3 occurences, only the last one shown
- > GET request to /wp-admin/post-new.php?post_type=offer-calc
- > Warning in wp-content/plugins/offer-calc/includes/meta-boxes/class-offer-calc-meta-box.php+1214
count(): Parameter must be an array or an object that implements Countable
SRP 0% from 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
The following issues need your attention
- 1× PHP files output non-empty strings when accessed directly via GET requests:
- > /wp-content/plugins/offer-calc/offer-calc-pro/includes/offer-calc-captcha-code.php
- 11× PHP files trigger server errors when accessed directly (only 10 are shown):
- > PHP Warning
imagettftext(): Could not find/open font in wp-content/plugins/offer-calc/offer-calc-pro/includes/offer-calc-captcha-code.php on line 66
- > PHP Warning
imagettfbbox(): Could not find/open font in wp-content/plugins/offer-calc/offer-calc-pro/includes/offer-calc-captcha-code.php on line 61
- > PHP Notice
Trying to get property 'post_title' of non-object in wp-content/plugins/offer-calc/offer-calc-pro/includes/admin/forms/offer-email.php on line 15
- > PHP Notice
Trying to access array offset on value of type bool in wp-content/plugins/offer-calc/offer-calc-pro/includes/offer-calc-captcha-code.php on line 63
- > PHP Notice
Trying to access array offset on value of type bool in wp-content/plugins/offer-calc/offer-calc-pro/includes/offer-calc-captcha-code.php on line 64
- > PHP Warning
Use of undefined constant OFFER_CALC_PRO_DIR - assumed 'OFFER_CALC_PRO_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/offer-calc/offer-calc-pro/includes/offer-calc-captcha-code.php on line 16
- > PHP Notice
Undefined index: ofc_id in wp-content/plugins/offer-calc/offer-calc-pro/includes/offer-calc-captcha-code.php on line 73
- > PHP Notice
Undefined variable: post in wp-content/plugins/offer-calc/offer-calc-pro/includes/admin/forms/offer-email.php on line 15
- > PHP Notice
Undefined index: rand in wp-content/plugins/offer-calc/offer-calc-pro/includes/offer-calc-captcha-code.php on line 73
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/offer-calc/offer-calc-pro/includes/admin/forms/offer-email.php:23
- > PHP Warning
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 93% from 29 tests
readme.txt 94% from 16 tests
Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Please fix the following attributes:
- Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
offer-calc/offercalc.php 92% from 13 tests
The primary PHP file in "Offer Calc" version 1.2 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
- Main file name: Name the main plugin file the same as the plugin slug ("offer-calc.php" instead of "offercalc.php")
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
Good job! No executable or dangerous file extensions detected8,011 lines of code in 44 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 10 | 759 | 468 | 3,558 |
PHP | 23 | 1,125 | 1,745 | 2,929 |
CSS | 9 | 85 | 58 | 1,314 |
PO File | 1 | 64 | 83 | 150 |
Markdown | 1 | 20 | 0 | 60 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.42 |
Average class complexity | 49.30 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 265.00 |
Average method complexity | 4.31 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 55.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 10 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 10 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 146 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 146 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 14 | |
▷ Named functions | 14 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 16 | |
▷ Global constants | 16 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
Using a strong compression for your PNG files is a great way to speed-up your plugin
27 PNG files occupy 1.97MB with 0.97MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
assets/screenshot-2.png | 93.06KB | 28.08KB | ▼ 69.83% |
sample-form.png | 7.27KB | 3.23KB | ▼ 55.59% |
assets/screenshot-8.png | 95.39KB | 27.69KB | ▼ 70.97% |
includes/meta-boxes/images/delete-16.png | 1.74KB | 0.90KB | ▼ 48.23% |
includes/meta-boxes/images/edit.png | 1.24KB | 1.23KB | ▼ 0.87% |