Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully
Server metrics [RAM: ▲0.17MB] [CPU: ▼3.22ms] Passed 4 tests
Analyzing server-side resources used by Coupon & Discount Code Reveal Button
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.58 ▲0.12 | 43.38 ▲3.02 |
Dashboard /wp-admin | 3.49 ▲0.19 | 47.07 ▼3.38 |
Posts /wp-admin/edit.php | 3.60 ▲0.25 | 46.47 ▼2.82 |
Add New Post /wp-admin/post-new.php | 6.07 ▲0.19 | 90.83 ▼8.56 |
Media Library /wp-admin/upload.php | 3.41 ▲0.19 | 38.36 ▲1.87 |
Server storage [IO: ▲0.32MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 20 new files
Database: 1 new table, 7 new options
New tables |
---|
wp_spbcta |
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
widget_recent-comments |
theysaidso_admin_options |
widget_theysaidso_widget |
spbcta_db_version |
widget_recent-posts |
Browser metrics Passed 4 tests
An overview of browser requirements for Coupon & Discount Code Reveal Button
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,923 ▲188 | 13.53 ▼1.15 | 9.12 ▲7.39 | 39.85 ▼0.04 |
Dashboard /wp-admin | 2,224 ▲39 | 4.89 ▼0.92 | 93.57 ▼4.02 | 77.60 ▲31.83 |
Posts /wp-admin/edit.php | 2,101 ▲12 | 2.00 ▼0.01 | 35.09 ▼0.99 | 28.89 ▼4.84 |
Add New Post /wp-admin/post-new.php | 1,527 ▼6 | 23.35 ▲0.37 | 629.74 ▼19.71 | 51.98 ▼2.25 |
Media Library /wp-admin/upload.php | 1,400 ▲12 | 4.14 ▼0.10 | 102.09 ▼4.02 | 64.45 ▲16.01 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
- This plugin does not fully uninstall, leaving 1 table in the database
- wp_spbcta
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_recent-comments
- db_upgraded
- can_compress_scripts
- widget_recent-posts
- theysaidso_admin_options
- widget_theysaidso_widget
- spbcta_db_version
Smoke tests Passed 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP Passed 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
The SRP test was a success
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: bonus code, discount code button, button, coupon button, reveal button
coupon-reveal-button/spbcta-plugin.php 92% from 13 tests
The main PHP script in "Coupon & Discount Code Reveal Button" version 1.2.5 is automatically included on every request by WordPress
It is important to fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("coupon-reveal-button.php" instead of "spbcta-plugin.php")
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
No dangerous file extensions were detected1,201 lines of code in 13 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 8 | 194 | 409 | 933 |
JavaScript | 2 | 17 | 16 | 265 |
CSS | 2 | 0 | 0 | 2 |
SVG | 1 | 0 | 0 | 1 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.43 |
Average class complexity | 18.14 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 75.00 |
Average method complexity | 3.25 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 31.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 54 | |
▷ Static methods | 1 | 1.85% |
▷ Public methods | 46 | 85.19% |
▷ Protected methods | 1 | 1.85% |
▷ Private methods | 7 | 12.96% |
Functions | 3 | |
▷ Named functions | 2 | 66.67% |
▷ Anonymous functions | 1 | 33.33% |
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
Using a strong compression for your PNG files is a great way to speed-up your plugin
5 PNG files occupy 0.21MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
admin_notification/src/preview.png | 185.49KB | 59.75KB | ▼ 67.79% |
img/p-design-1.png | 4.32KB | 2.07KB | ▼ 52.08% |
img/p-design-2.png | 6.96KB | 3.30KB | ▼ 52.51% |
img/icon.png | 15.67KB | 0.52KB | ▼ 96.68% |
img/nofollow-img.png | 4.32KB | 2.15KB | ▼ 50.21% |