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.18MB] [CPU: ▼276.66ms] Passed 4 tests
Analyzing server-side resources used by Unloct
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.97 ▲0.25 | 36.94 ▲15.73 |
Dashboard /wp-admin | 3.27 ▲0.21 | 50.72 ▲13.84 |
Posts /wp-admin/edit.php | 3.31 ▲0.21 | 42.30 ▲0.33 |
Add New Post /wp-admin/post-new.php | 5.57 ▲0.14 | 89.23 ▼1,118.19 |
Media Library /wp-admin/upload.php | 3.15 ▲0.14 | 34.72 ▼2.63 |
Server storage [IO: ▲0.68MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 1 new option
New WordPress options |
---|
widget_my-text |
Browser metrics Passed 4 tests
A check of browser resources used by Unloct
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,722 ▲140 | 15.87 ▼0.01 | 7.42 ▼1.72 | 48.91 ▲1.52 |
Dashboard /wp-admin | 2,958 ▲105 | 5.92 ▲0.06 | 151.13 ▲2.63 | 119.86 ▲19.17 |
Posts /wp-admin/edit.php | 2,735 ▲29 | 2.69 ▼0.00 | 71.99 ▲6.44 | 89.24 ▼2.58 |
Add New Post /wp-admin/post-new.php | 1,501 ▼2,167 | 18.53 ▼2.22 | 365.50 ▼40.35 | 110.87 ▲3.89 |
Media Library /wp-admin/upload.php | 1,806 ▲34 | 5.02 ▼0.01 | 146.51 ▼5.17 | 108.48 ▼11.79 |
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
Please fix the following items
- Zombie WordPress options were found after uninstall: 1 option
- widget_my-text
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
Even though everything seems fine, this is not an exhaustive test
SRP 50% from 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
Please fix the following
- 4× PHP files trigger errors when accessed directly with GET requests:
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/unloct/unloct_widget.php:10
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/unloct/unloct_login.php:22
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/unloct/visitor_short_code.php:33
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/unloct/unloct_short_code.php:33
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found
Optimizations
Plugin configuration 83% from 29 tests
readme.txt 94% from 16 tests
Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need to be fixed:
- Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line (
=== unloct ===
)
unloct/unloct_login.php 69% from 13 tests
Analyzing the main PHP file in "Unloct" version 3.1.0
It is important to fix the following:
- Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
- Description: Please don't use more than 140 characters for the plugin description (currently 490 characters long)
- Domain Path: The domain path folder was not found ("/wordpress")
- Main file name: Name the main plugin file the same as the plugin slug ("unloct.php" instead of "unloct_login.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin700 lines of code in 6 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 172 | 97 | 652 |
CSS | 1 | 13 | 0 | 48 |
PHP code Passed 2 tests
This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.36 |
Average class complexity | 27.33 |
▷ Minimum class complexity | 5.00 |
▷ Maximum class complexity | 64.00 |
Average method complexity | 2.49 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 11.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 3 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 3 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 54 | |
▷ Static methods | 1 | 1.85% |
▷ Public methods | 23 | 42.59% |
▷ Protected methods | 30 | 55.56% |
▷ Private methods | 1 | 1.85% |
Functions | 6 | |
▷ Named functions | 5 | 83.33% |
▷ Anonymous functions | 1 | 16.67% |
Constants | 0 | |
▷ Global constants | 0 | 0.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size 0% from 1 test
Image compression 0% from 1 test
Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.64MB with 0.41MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/widget4.png | 99.44KB | 40.11KB | ▼ 59.66% |
img/widget3.png | 201.95KB | 56.03KB | ▼ 72.26% |
img/widget1.png | 132.06KB | 56.27KB | ▼ 57.39% |
img/widget2.png | 205.91KB | 55.97KB | ▼ 72.82% |
img/widget5.png | 13.52KB | 6.05KB | ▼ 55.28% |