Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼317.24ms] Passed 4 tests
This is a short check of server-side resources used by Add to Favorites Plugin (Add2Fav)
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.69 ▲0.17 | 58.81 ▲0.54 |
Dashboard /wp-admin | 3.52 ▲0.11 | 45.34 ▲6.81 |
Posts /wp-admin/edit.php | 3.74 ▲0.10 | 41.22 ▼4.74 |
Add New Post /wp-admin/post-new.php | 6.98 ▲0.01 | 99.20 ▼1,260.83 |
Media Library /wp-admin/upload.php | 3.40 ▲0.10 | 27.17 ▼3.91 |
Add2Fav /wp-admin/options-general.php?page=add2fav_uid | 3.37 | 29.07 |
Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 2 new options
New WordPress options |
---|
widget_add2favwidget |
widget_add2fav_list_widget |
Browser metrics Passed 4 tests
An overview of browser requirements for Add to Favorites Plugin (Add2Fav)
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,913 ▲171 | 16.25 ▲0.60 | 11.96 ▲5.81 | 2.51 ▲0.33 |
Dashboard /wp-admin | 2,893 ▲35 | 6.01 ▼0.01 | 113.93 ▼18.78 | 152.00 ▼11.60 |
Posts /wp-admin/edit.php | 2,696 ▲26 | 3.24 ▼0.00 | 62.29 ▼2.38 | 143.99 ▲11.16 |
Add New Post /wp-admin/post-new.php | 1,664 ▼47 | 16.13 ▼5.01 | 419.82 ▼5.50 | 158.00 ▲9.39 |
Media Library /wp-admin/upload.php | 1,706 ▲8 | 5.53 ▲0.01 | 136.78 ▲1.49 | 193.60 ▲11.22 |
Add2Fav /wp-admin/options-general.php?page=add2fav_uid | 1,082 | 2.37 | 51.61 | 115.29 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
- Zombie WordPress options were found after uninstall: 2 options
- widget_add2favwidget
- widget_add2fav_list_widget
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected
SRP 50% from 2 tests
🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
- 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/add2fav/WPP_Widget.php:63
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/add2fav/WPP_Widget.php:63
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/add2fav/WPP_Widget.php:63
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/add2fav/WPP_Widget.php:63
- > PHP Fatal error
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)
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
- Screenshots: Add images for these screenshots: #1 (Add to Favorites Widget), #2 (My Favorites Widget)
add2fav/Add2favPlugin.php 92% from 13 tests
The main file in "Add to Favorites Plugin (Add2Fav)" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
- Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("add2fav.php" instead of "Add2favPlugin.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 plugin636 lines of code in 7 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 61 | 137 | 507 |
JavaScript | 1 | 2 | 0 | 106 |
CSS | 1 | 3 | 0 | 23 |
PHP code Passed 2 tests
An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.18 |
Average class complexity | 8.25 |
▷ Minimum class complexity | 2.00 |
▷ Maximum class complexity | 20.00 |
Average method complexity | 1.76 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 1 | 25.00% |
▷ Concrete classes | 3 | 75.00% |
▷ Final classes | 0 | 0.00% |
Methods | 38 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 31 | 81.58% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 7 | 18.42% |
Functions | 9 | |
▷ Named functions | 9 | 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
Using a strong compression for your PNG files is a great way to speed-up your plugin
7 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
heart.png | 0.73KB | 0.83KB | 0.00% |
screenshot-1.png | 3.20KB | 2.05KB | ▼ 35.97% |
star.png | 0.65KB | 0.72KB | 0.00% |
screenshot-2.png | 19.79KB | 6.31KB | ▼ 68.10% |
delete.png | 0.51KB | 0.42KB | ▼ 17.92% |