Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/recommend-a-friend/inc/class-raf-widget.php+63
Function create_function() is deprecated
Server metrics [RAM: ▼1.86MB] [CPU: ▼48.70ms] Passed 4 tests
Server-side resources used by Recommend to a friend
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.13 ▼1.34 | 5.41 ▼37.61 |
Dashboard /wp-admin | 2.15 ▼1.16 | 8.31 ▼35.88 |
Posts /wp-admin/edit.php | 2.15 ▼1.21 | 7.11 ▼37.16 |
Add New Post /wp-admin/post-new.php | 2.15 ▼3.74 | 6.83 ▼84.16 |
Media Library /wp-admin/upload.php | 2.15 ▼1.08 | 6.30 ▼28.14 |
Recommend to a friend /wp-admin/options-general.php?page=raf-options | 2.15 | 7.80 |
Server storage [IO: ▲0.44MB] [DB: ▲0.00MB] Passed 3 tests
A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 73 new files
Database: no new tables, 8 new options
New WordPress options |
---|
widget_theysaidso_widget |
db_upgraded |
can_compress_scripts |
widget_recommend_a_friend |
raf_options |
widget_recent-comments |
widget_recent-posts |
theysaidso_admin_options |
Browser metrics Passed 4 tests
This is an overview of browser requirements for Recommend to a friend
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,924 ▲153 | 14.07 ▼0.72 | 6.42 ▲4.44 | 40.98 ▼4.02 |
Dashboard /wp-admin | 2,228 ▲40 | 5.06 ▲0.20 | 102.41 ▼14.48 | 39.17 ▼3.82 |
Posts /wp-admin/edit.php | 2,095 ▲6 | 2.33 ▲0.29 | 37.18 ▲0.13 | 33.78 ▲0.64 |
Add New Post /wp-admin/post-new.php | 1,537 ▼5 | 23.30 ▲5.23 | 627.33 ▲26.13 | 35.74 ▼11.08 |
Media Library /wp-admin/upload.php | 1,417 ▲26 | 4.42 ▲0.17 | 90.69 ▼7.40 | 42.94 ▲1.09 |
Recommend to a friend /wp-admin/options-general.php?page=raf-options | 1,437 | 2.87 | 67.16 | 26.04 |
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
It is recommended to fix the following
- This plugin cannot be uninstalled
- > Deprecated in wp-content/plugins/recommend-a-friend/inc/class-raf-widget.php+63
Function create_function() is deprecated
- The uninstall procedure has failed, leaving 8 options in the database
- raf_options
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- theysaidso_admin_options
- db_upgraded
- widget_recommend_a_friend
- widget_recent-comments
Smoke tests 50% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
- > GET request to /wp-admin/options-general.php?page=raf-options
- > Deprecated in wp-content/plugins/recommend-a-friend/inc/class-raf-widget.php+63
Function create_function() is deprecated
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
- 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/recommend-a-friend/inc/class-raf-widget.php:6
- > PHP Notice
Undefined variable: display_type in wp-content/plugins/recommend-a-friend/views/widget.tpl.php on line 13
- > PHP Warning
Use of undefined constant RAF_URL - assumed 'RAF_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/recommend-a-friend/views/raf-form.tpl.php on line 11
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/recommend-a-friend/recommend-to-a-friend.php:30
- > PHP Fatal error
Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/recommend-a-friend/lib/recaptcha/ReCaptcha/RequestMethod/CurlPost.php:37
- > PHP Warning
Use of undefined constant RAF_URL - assumed 'RAF_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/recommend-a-friend/views/raf-form.tpl.php on line 7
- > PHP Fatal error
Uncaught Error: Interface 'ReCaptcha\\RequestMethod' not found in wp-content/plugins/recommend-a-friend/lib/recaptcha/ReCaptcha/RequestMethod/SocketPost.php:37
- > PHP Fatal error
Uncaught Error: Call to undefined function get_stylesheet_directory() in wp-content/plugins/recommend-a-friend/views/raf-form.tpl.php:12
- > PHP Fatal error
Uncaught Error: Call to undefined function add_query_arg() in wp-content/plugins/recommend-a-friend/views/raf-link.tpl.php:2
- > PHP Fatal error
Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/recommend-a-friend/views/admin/options-page.tpl.php:2
- > 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 90% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: share, email, widget, facebook, recommend
recommend-a-friend/recommend-to-a-friend.php 77% from 13 tests
The entry point to "Recommend to a friend" version 2.2.2 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
- Main file name: Name the main plugin file the same as the plugin slug ("recommend-a-friend.php" instead of "recommend-to-a-friend.php")
- Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
- Git Repository: Please remove the Git repository from this plugin
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected2,969 lines of code in 36 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
JavaScript | 7 | 302 | 122 | 932 |
PHP | 21 | 191 | 598 | 751 |
PO File | 4 | 252 | 278 | 577 |
CSS | 3 | 59 | 46 | 462 |
SVG | 1 | 0 | 0 | 247 |
PHP code Passed 2 tests
Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.40 |
Average class complexity | 8.00 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 46.00 |
Average method complexity | 2.32 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 8.00 |
Code structure | ||
---|---|---|
Namespaces | 2 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 11 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 11 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 39 | |
▷ Static methods | 9 | 23.08% |
▷ Public methods | 39 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 4 | |
▷ Named functions | 3 | 75.00% |
▷ Anonymous functions | 1 | 25.00% |
Constants | 9 | |
▷ Global constants | 2 | 22.22% |
▷ Class constants | 7 | 77.78% |
▷ Public constants | 7 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
25 compressed PNG files occupy 0.07MB
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
js/fancybox/fancy_shadow_nw.png | 0.32KB | 0.47KB | 0.00% |
images/share-twt-btn.png | 1.78KB | 1.55KB | ▼ 13.01% |
js/fancybox/fancy_shadow_e.png | 0.10KB | 0.18KB | 0.00% |
js/fancybox/fancy_title_main.png | 0.09KB | 0.14KB | 0.00% |
js/fancybox/fancy_close.png | 1.48KB | 1.73KB | 0.00% |