Benchmarks
Plugin footprint Passed 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.02MB] [CPU: ▼141.27ms] Passed 4 tests
A check of server-side resources used by LB Discount
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.84 ▲0.12 | 42.18 ▲21.65 |
Dashboard /wp-admin | 3.07 ▲0.02 | 42.75 ▲0.12 |
Posts /wp-admin/edit.php | 3.16 ▲0.05 | 40.36 ▲1.06 |
Add New Post /wp-admin/post-new.php | 5.43 ▼0.00 | 84.59 ▼568.78 |
Media Library /wp-admin/upload.php | 3.02 ▲0.02 | 34.04 ▲2.53 |
Server storage [IO: ▲0.02MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 9 new files
Database: no new tables, no new options
Browser metrics Passed 4 tests
LB Discount: an overview of browser usage
Minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,737 ▲141 | 16.31 ▲0.72 | 9.48 ▼0.88 | 46.54 ▲0.35 |
Dashboard /wp-admin | 3,001 ▲70 | 5.88 ▼0.09 | 141.01 ▼0.33 | 118.32 ▲13.43 |
Posts /wp-admin/edit.php | 2,775 ▲39 | 2.72 ▼0.00 | 68.83 ▲6.97 | 83.49 ▼8.52 |
Add New Post /wp-admin/post-new.php | 1,705 ▲205 | 18.86 ▲0.38 | 375.98 ▲4.43 | 109.98 ▲2.83 |
Media Library /wp-admin/upload.php | 1,841 ▲31 | 5.06 ▲0.04 | 169.63 ▲25.55 | 133.56 ▲12.77 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled completely, with no zombie files or tables
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected
SRP Passed 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Congratulations! This plugin passed the SRP test
User-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found
Optimizations
Plugin configuration Passed 29 tests
readme.txt Passed 16 tests
The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
3 plugin tags: woocommerce, store, discount
lb-discount/lb-discount.php Passed 13 tests
Analyzing the main PHP file in "LB Discount" version 1.0.0
49 characters long description:
Apply a percentage discount on the first purchase
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin217 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 49 | 124 | 173 |
PO File | 1 | 13 | 15 | 44 |
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.22 |
Average class complexity | 4.00 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 6.00 |
Average method complexity | 1.43 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 4.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 2 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 2 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 14 | |
▷ Static methods | 1 | 7.14% |
▷ Public methods | 10 | 71.43% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 4 | 28.57% |
Functions | 1 | |
▷ Named functions | 1 | 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
Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin