Benchmarks
Plugin footprint 65% from 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.06MB] [CPU: ▼6.73ms] Passed 4 tests
Analyzing server-side resources used by Simple Rating
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.70 ▲0.23 | 43.60 ▲1.23 |
Dashboard /wp-admin | 3.54 ▲0.23 | 49.88 ▼1.85 |
Posts /wp-admin/edit.php | 3.65 ▲0.29 | 48.67 ▼1.73 |
Add New Post /wp-admin/post-new.php | 5.43 ▼0.46 | 67.83 ▼24.55 |
Media Library /wp-admin/upload.php | 3.46 ▲0.23 | 38.48 ▲2.87 |
Simple Rating /wp-admin/options-general.php?page=spr_options | 3.50 | 36.16 |
Server storage [IO: ▲0.23MB] [DB: ▲0.00MB] Passed 3 tests
Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 36 new files
Database: 2 new tables, 9 new options
New tables |
---|
wp_spr_votes |
wp_spr_rating |
New WordPress options |
---|
widget_spr_top_widget |
can_compress_scripts |
widget_recent-posts |
widget_recent-comments |
spr_settings |
db_upgraded |
widget_theysaidso_widget |
spr_version |
theysaidso_admin_options |
Browser metrics Passed 4 tests
Checking browser requirements for Simple Rating
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,818 ▲57 | 14.72 ▲0.22 | 2.15 ▲0.30 | 43.91 ▼3.17 |
Dashboard /wp-admin | 2,199 ▲25 | 5.59 ▲0.01 | 91.89 ▼9.98 | 39.04 ▼4.48 |
Posts /wp-admin/edit.php | 2,104 ▲4 | 1.95 ▼0.04 | 40.55 ▲4.82 | 33.68 ▼0.84 |
Add New Post /wp-admin/post-new.php | 1,529 ▲1 | 23.07 ▲0.13 | 647.47 ▼59.07 | 53.83 ▲1.57 |
Media Library /wp-admin/upload.php | 1,401 ▲7 | 4.19 ▲0.02 | 98.02 ▼9.56 | 42.74 ▼4.55 |
Simple Rating /wp-admin/options-general.php?page=spr_options | 1,317 | 2.20 | 29.08 | 35.08 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
- This plugin did not uninstall without warnings or errors
- > Warning in wp-content/plugins/simple-rating/uninstall.php+13
rmdir(wp-content/plugins/simple-rating): Directory not empty
- Zombie WordPress options were found after uninstall: 6 options
- widget_recent-posts
- widget_theysaidso_widget
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
- can_compress_scripts
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 no errors were found, this is by no means an exhaustive test
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
- 3× PHP files trigger server-side errors or warnings when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function spr_save_settings() in wp-content/plugins/simple-rating/settings.php:9
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-rating/spr_widgets.php:3
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-rating/spr_widgets.php:3
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
8 plugin tags: star ratings, custom post type, vote, ratings, post rating...
simple-rating/rating.php 92% from 13 tests
"Simple Rating" version 1.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("simple-rating.php" instead of "rating.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin1,877 lines of code in 10 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 5 | 51 | 24 | 1,543 |
JavaScript | 3 | 16 | 0 | 201 |
CSS | 2 | 0 | 0 | 133 |
PHP code Passed 2 tests
This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 16.00 |
▷ Minimum class complexity | 16.00 |
▷ Maximum class complexity | 16.00 |
Average method complexity | 4.00 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 7.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 1 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 1 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 5 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 5 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 30 | |
▷ Named functions | 30 | 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
PNG files should be compressed to save space and minimize bandwidth usage
21 PNG files occupy 0.10MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
resources/purple_bar.png | 3.14KB | 0.29KB | ▼ 90.66% |
resources/red_bar.png | 3.11KB | 0.29KB | ▼ 90.57% |
resources/green_bar.png | 3.12KB | 0.29KB | ▼ 90.62% |
resources/red_circles.png | 4.89KB | 1.84KB | ▼ 62.32% |
resources/purple_circles.png | 4.95KB | 1.82KB | ▼ 63.22% |