Benchmarks
Plugin footprint 83% 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.34MB] [CPU: ▼135.25ms] Passed 4 tests
This is a short check of server-side resources used by Custom Ratings
Server-side resource usage in normal parameters
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.18 ▲0.35 | 51.73 ▲19.01 |
Dashboard /wp-admin | 3.44 ▲0.39 | 48.54 ▲3.85 |
Posts /wp-admin/edit.php | 3.50 ▲0.39 | 45.56 ▲0.85 |
Add New Post /wp-admin/post-new.php | 5.75 ▲0.31 | 94.08 ▼550.64 |
Media Library /wp-admin/upload.php | 3.32 ▲0.32 | 35.88 ▲4.95 |
Custom Ratings /wp-admin/options-general.php?page=custom-ratings-options-page | 3.32 | 41.86 |
Server storage [IO: ▲0.82MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 51 new files
Database: no new tables, 14 new options
New WordPress options |
---|
wpcr_first_vote_text |
wpcr_plugin_version |
wpcr_excerpt_output_type |
wpcr_error_text |
wpcr_loading_text |
wpcr_report_text |
wpcr_intro_text |
wpcr_content_output_type |
wpcr_only_in_loop |
wpcr_post_types |
... |
Browser metrics Passed 4 tests
An overview of browser requirements for Custom Ratings
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 3,987 ▲391 | 17.57 ▲1.94 | 44.65 ▲33.43 | 47.57 ▼3.86 |
Dashboard /wp-admin | 2,982 ▲48 | 6.01 ▲0.05 | 141.13 ▼23.74 | 109.21 ▲0.62 |
Posts /wp-admin/edit.php | 2,792 ▲53 | 2.70 ▲0.00 | 63.96 ▼1.98 | 88.43 ▼3.31 |
Add New Post /wp-admin/post-new.php | 1,617 ▼66 | 18.47 ▼0.27 | 369.74 ▼21.64 | 116.88 ▲11.71 |
Media Library /wp-admin/upload.php | 1,760 ▼47 | 5.04 ▲0.03 | 163.23 ▲17.09 | 113.64 ▲0.90 |
Custom Ratings /wp-admin/options-general.php?page=custom-ratings-options-page | 2,297 | 4.33 | 111.34 | 118.87 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
- This plugin did not uninstall successfully, leaving 14 options in the database
- wpcr_only_in_loop
- wpcr_only_on_main_query
- wpcr_first_vote_text
- wpcr_star_type
- wpcr_content_output_type
- wpcr_adding_vote_text
- wpcr_error_text
- wpcr_excerpt_output_type
- wpcr_report_text
- wpcr_thank_you_text
- ...
Smoke tests 50% 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 0% 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
Please fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/custom-ratings/public/partials/custom-ratings-excerpt-public-display.php
- 8× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/custom-ratings/includes/custom-ratings-post-data.php:27
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-ratings/admin/partials/custom-ratings-post-admin-display.php:36
- > PHP Warning
Use of undefined constant ICL_LANGUAGE_CODE - assumed 'ICL_LANGUAGE_CODE' (this will throw an Error in a future version of PHP) in wp-content/plugins/custom-ratings/includes/set-decimal.php on line 37
- > PHP Notice
Trying to get property 'ID' of non-object in wp-content/plugins/custom-ratings/includes/custom-ratings-post-data.php on line 24
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/custom-ratings/public/partials/custom-ratings-public-ractive-template.php:8
- > PHP Notice
Undefined variable: star_type in wp-content/plugins/custom-ratings/public/partials/custom-ratings-public-ractive-template.php on line 6
- > PHP Notice
Undefined variable: star_img_url in wp-content/plugins/custom-ratings/public/partials/custom-ratings-public-ractive-template.php on line 8
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/custom-ratings/public/custom-ratings-display-variables-and-checks.php:4
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found
Optimizations
Plugin configuration 97% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
- Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line (
=== custom-ratings ===
)
custom-ratings/custom-ratings.php Passed 13 tests
The principal PHP file in "Custom Ratings" v. 1.5.1 is loaded by WordPress automatically on each request
123 characters long description:
Rate post, pages, custom post types, and more! Upload your own rating object (cat, cupcake, wine glass, whatever you want!)
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
There were no executable files found in this plugin16,943 lines of code in 33 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 7 | 4,205 | 1,425 | 14,074 |
PHP | 17 | 411 | 751 | 1,431 |
CSS | 4 | 104 | 42 | 976 |
Sass | 3 | 66 | 11 | 380 |
JSON | 2 | 0 | 0 | 82 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.19 |
Average class complexity | 15.14 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 47.00 |
Average method complexity | 2.33 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 12.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 7 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 7 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 72 | |
▷ Static methods | 7 | 9.72% |
▷ Public methods | 67 | 93.06% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 5 | 6.94% |
Functions | 7 | |
▷ Named functions | 3 | 42.86% |
▷ Anonymous functions | 4 | 57.14% |
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.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
public/images/star.png | 8.05KB | 4.47KB | ▼ 44.51% |
public/images/cash.png | 19.91KB | 10.34KB | ▼ 48.05% |
public/images/heart.png | 10.08KB | 6.34KB | ▼ 37.09% |
public/images/carrot.png | 9.41KB | 5.20KB | ▼ 44.69% |
public/images/wine-glass.png | 16.08KB | 6.97KB | ▼ 56.64% |