Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
- Install procedure had errors
- > Notice in wp-content/plugins/book-collection-star-rating/star-rating.php+16
Constant STAR_PLUGIN_DIR already defined
Server metrics [RAM: ▼1.93MB] [CPU: ▼52.34ms] Passed 4 tests
Server-side resources used by Simple Star Rating
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.06 ▼1.40 | 4.23 ▼36.59 |
Dashboard /wp-admin | 2.08 ▼1.23 | 5.35 ▼42.39 |
Posts /wp-admin/edit.php | 2.08 ▼1.28 | 6.36 ▼41.22 |
Add New Post /wp-admin/post-new.php | 2.08 ▼3.81 | 6.41 ▼89.17 |
Media Library /wp-admin/upload.php | 2.08 ▼1.15 | 5.20 ▼26.72 |
Server storage [IO: ▲0.01MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options |
---|
widget_theysaidso_widget |
theysaidso_admin_options |
can_compress_scripts |
widget_recent-posts |
db_upgraded |
widget_recent-comments |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Simple Star Rating
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,805 ▲70 | 13.56 ▼1.06 | 1.59 ▼0.31 | 39.41 ▼11.99 |
Dashboard /wp-admin | 2,206 ▲17 | 5.83 ▲0.89 | 104.52 ▼12.75 | 40.31 ▼3.64 |
Posts /wp-admin/edit.php | 2,092 ▼0 | 1.99 ▼0.07 | 41.63 ▼3.72 | 34.40 ▼4.48 |
Add New Post /wp-admin/post-new.php | 6,311 ▲4,769 | 22.51 ▲4.33 | 894.93 ▲285.72 | 58.35 ▲0.09 |
Media Library /wp-admin/upload.php | 1,388 ▼0 | 4.23 ▲0.00 | 98.23 ▼7.93 | 41.26 ▼4.38 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
- Uninstall procedure had uncaught errors
- > Notice in wp-content/plugins/book-collection-star-rating/star-rating.php+16
Constant STAR_PLUGIN_DIR already defined
- This plugin did not uninstall successfully, leaving 6 options in the database
- widget_theysaidso_widget
- widget_recent-comments
- theysaidso_admin_options
- db_upgraded
- widget_recent-posts
- can_compress_scripts
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
The smoke test was a success, however most plugin functionality was not tested
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
Please fix the following items
- 2× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/book-collection-star-rating/includes/functions.php:3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/book-collection-star-rating/star-rating.php:12
- > 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
3 plugin tags: reviews, rating, star rating
book-collection-star-rating/star-rating.php 92% from 13 tests
This is the main PHP file of "Simple Star Rating" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
- Main file name: The principal plugin file should be the same as the plugin slug ("book-collection-star-rating.php" instead of "star-rating.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin159 lines of code in 4 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 2 | 35 | 26 | 96 |
CSS | 1 | 5 | 0 | 37 |
JavaScript | 1 | 8 | 3 | 26 |
PHP code Passed 2 tests
Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.37 |
Average class complexity | 0.00 |
▷ Minimum class complexity | 0.00 |
▷ Maximum class complexity | 0.00 |
Average method complexity | 0.00 |
▷ Minimum method complexity | 0.00 |
▷ Maximum method complexity | 0.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 0 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 0 | 0.00% |
▷ Final classes | 0 | 0.00% |
Methods | 0 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 0 | 0.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 8 | |
▷ Named functions | 8 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 4 | |
▷ Global constants | 4 | 100.00% |
▷ Class constants | 0 | 0.00% |
▷ Public constants | 0 | 0.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
includes/star.png | 1.40KB | 1.44KB | 0.00% |