Benchmarks
Plugin footprint 83% from 16 tests
Installer Passed 1 test
🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully
Server metrics [RAM: ▲0.08MB] [CPU: ▼10.10ms] Passed 4 tests
Analyzing server-side resources used by Rating
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 3.57 ▲0.10 | 42.42 ▲2.33 |
Dashboard /wp-admin | 3.40 ▲0.05 | 49.43 ▼17.15 |
Posts /wp-admin/edit.php | 3.45 ▲0.09 | 50.40 ▼1.74 |
Add New Post /wp-admin/post-new.php | 5.98 ▲0.09 | 92.77 ▼23.82 |
Media Library /wp-admin/upload.php | 3.33 ▲0.09 | 40.15 ▲4.08 |
Add New Rating /wp-admin/post-new.php?post_type=wsrp_rating | 3.42 | 45.82 |
Ratings /wp-admin/edit.php?post_type=wsrp_rating | 3.37 | 41.52 |
Server storage [IO: ▲0.26MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options |
---|
db_upgraded |
can_compress_scripts |
theysaidso_admin_options |
widget_recent-comments |
widget_theysaidso_widget |
widget_recent-posts |
Browser metrics Passed 4 tests
A check of browser resources used by Rating
There were no issues detected in relation to browser resource usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,928 ▲167 | 13.40 ▼0.93 | 9.88 ▲8.22 | 45.91 ▲3.93 |
Dashboard /wp-admin | 2,223 ▲46 | 5.72 ▲0.09 | 94.51 ▲4.62 | 87.19 ▲44.61 |
Posts /wp-admin/edit.php | 2,134 ▲31 | 2.02 ▼0.11 | 39.26 ▼6.13 | 35.51 ▼0.05 |
Add New Post /wp-admin/post-new.php | 1,552 ▲24 | 22.99 ▲0.03 | 672.41 ▲15.68 | 179.96 ▲113.78 |
Media Library /wp-admin/upload.php | 1,428 ▲25 | 4.15 ▼0.01 | 110.27 ▼1.54 | 78.92 ▲34.46 |
Add New Rating /wp-admin/post-new.php?post_type=wsrp_rating | 2,254 | 3.36 | 75.73 | 103.11 |
Ratings /wp-admin/edit.php?post_type=wsrp_rating | 1,107 | 2.24 | 38.17 | 29.85 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests
🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
- The uninstall procedure has failed, leaving 6 options in the database
- widget_recent-comments
- db_upgraded
- theysaidso_admin_options
- widget_theysaidso_widget
- can_compress_scripts
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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
- 8× GET requests to PHP files trigger server-side errors or Error 500 responses:
- > PHP Fatal error
Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/rating-add/UI/wsrp_user_interface.php:1
- > PHP Warning
Use of undefined constant WSRP_PLUGIN_PATH - assumed 'WSRP_PLUGIN_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/rating-add/inc/includes.php on line 3
- > PHP Warning
include(WSRP_PLUGIN_PATH/init/wsrp_init_class.php): failed to open stream: No such file or directory in wp-content/plugins/rating-add/inc/includes.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rating-add/config.php:4
- > PHP Warning
include(): Failed opening 'WSRP_PLUGIN_PATH/init/wsrp_init_class.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/rating-add/inc/includes.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/rating-add/templates/template-1.php:5
- > PHP Fatal error
Uncaught Error: Class 'WSRP_Init_Class' not found in wp-content/plugins/rating-add/inc/includes.php:8
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/rating-add/config.php:4
- > PHP Fatal error
User-side errors 0% from 1 test
🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
- > GET request to /wp-admin/post-new.php?post_type=wsrp_rating
- > Network (severe)
wp-content/plugins/rating-add/img/template1.png - Failed to load resource: the server responded with a status of 404 (Not Found)
Optimizations
Plugin configuration 90% from 29 tests
readme.txt 88% from 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
- Screenshots: Add images for these screenshots: #1 (Rating Demo), #2 (Rating Demo), #3 (Rating Demo), #4 (Rating Demo), #5 (Rating Demo)
- Tags: You are using too many tags: 13 tag instead of maximum 10
rating-add/index.php 92% from 13 tests
This is the main PHP file of "Rating" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
- Main file name: Please rename the main PHP file in this plugin to the plugin slug ("rating-add.php" instead of "index.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin1,231 lines of code in 9 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 6 | 188 | 27 | 650 |
JavaScript | 2 | 61 | 65 | 483 |
CSS | 1 | 11 | 0 | 98 |
PHP code Passed 2 tests
Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.26 |
Average class complexity | 47.00 |
▷ Minimum class complexity | 47.00 |
▷ Maximum class complexity | 47.00 |
Average method complexity | 3.88 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 23.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 | 17 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 17 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 1 | |
▷ Named functions | 1 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 3 | |
▷ Global constants | 3 | 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
9 PNG files occupy 0.20MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
img/template2.png | 36.88KB | 8.56KB | ▼ 76.78% |
img/template4.png | 30.68KB | 6.43KB | ▼ 79.04% |
img/star-icon.png | 0.71KB | 0.61KB | ▼ 14.50% |
img/template6.png | 24.64KB | 4.69KB | ▼ 80.96% |
img/template3.png | 32.86KB | 7.59KB | ▼ 76.90% |