Benchmarks
Plugin footprint 65% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices
Server metrics [RAM: ▲0.08MB] [CPU: ▼144.75ms] Passed 4 tests
This is a short check of server-side resources used by 2kb Performance
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.93 ▲0.09 | 25.55 ▼2.40 |
Dashboard /wp-admin | 3.14 ▲0.08 | 38.86 ▼9.16 |
Posts /wp-admin/edit.php | 3.26 ▲0.14 | 35.53 ▼2.01 |
Add New Post /wp-admin/post-new.php | 5.51 ▲0.06 | 104.60 ▼565.41 |
Media Library /wp-admin/upload.php | 3.09 ▲0.08 | 27.87 ▲1.68 |
2kb Performance /wp-admin/options-general.php?page=2kb-performance | 3.07 | 21.13 |
Server storage [IO: ▲0.06MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 2 new options
New WordPress options |
---|
2kb-performance-cached-css |
2kb-performance-cached-js |
Browser metrics Passed 4 tests
Checking browser requirements for 2kb Performance
This plugin renders optimally with no browser resource issues detected
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,674 ▲73 | 15.06 ▼0.86 | 4.98 ▲0.07 | 60.23 ▼17.40 |
Dashboard /wp-admin | 2,934 ▲39 | 6.12 ▼0.03 | 118.17 ▼15.49 | 168.31 ▼5.14 |
Posts /wp-admin/edit.php | 2,748 ▲8 | 3.23 ▲0.01 | 62.62 ▼8.01 | 141.22 ▼0.61 |
Add New Post /wp-admin/post-new.php | 3,738 ▲3 | 18.49 ▲0.78 | 505.14 ▲70.44 | 193.57 ▲28.11 |
Media Library /wp-admin/upload.php | 1,757 ▲8 | 5.56 ▲0.08 | 141.84 ▲3.72 | 182.79 ▼2.40 |
2kb Performance /wp-admin/options-general.php?page=2kb-performance | 1,231 | 2.40 | 54.74 | 113.05 |
Uninstaller [IO: ▲0.22MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
- This plugin did not uninstall without warnings or errors
- > Warning in wp-content/plugins/2kb-performance/uninstall.php+19
rmdir(wp-content/uploads/2kb-performance): Directory not empty
- This plugin does not fully uninstall, leaving 2 options in the database
- 2kb-performance-cached-js
- 2kb-performance-cached-css
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
Good news, no errors were detected
SRP 50% 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
Almost there! Just fix the following items
- 1× GET requests to PHP files have triggered server-side errors or warnings:
- > PHP Fatal error
Uncaught Error: Call to undefined function __() in wp-content/plugins/2kb-performance/admin-template.php:1
- > PHP Fatal error
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 90% from 29 tests
readme.txt 88% 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
These attributes need to be fixed:
- Contributors: Plugin contributors not specified
- Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line (
=== 2kb-performance ===
)
2kb-performance/plugin.php 92% from 13 tests
"2kb Performance" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
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 ("2kb-performance.php" instead of "plugin.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected1,140 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 4 | 205 | 253 | 983 |
Markdown | 1 | 96 | 0 | 157 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 78.50 |
▷ Minimum class complexity | 77.00 |
▷ Maximum class complexity | 80.00 |
Average method complexity | 3.54 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 15.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 | 61 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 34 | 55.74% |
▷ Protected methods | 4 | 6.56% |
▷ Private methods | 23 | 37.70% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 14 | |
▷ Global constants | 3 | 21.43% |
▷ Class constants | 11 | 78.57% |
▷ Public constants | 11 | 100.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
No PNG images were found in this plugin