Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/socialdraft/includes/pagination.class.php+2
Methods with the same name as their class will not be constructors in a future version of PHP; pagination has a deprecated constructor
Server metrics [RAM: ▼1.81MB] [CPU: ▼55.85ms] Passed 4 tests
This is a short check of server-side resources used by Socialdraft
This plugin does not affect your website's performance
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.19 ▼1.27 | 5.11 ▼31.69 |
Dashboard /wp-admin | 2.21 ▼1.14 | 6.70 ▼54.57 |
Posts /wp-admin/edit.php | 2.21 ▼1.15 | 5.88 ▼44.12 |
Add New Post /wp-admin/post-new.php | 2.21 ▼3.68 | 6.47 ▼93.03 |
Media Library /wp-admin/upload.php | 2.21 ▼1.02 | 6.09 ▼26.20 |
Customers /wp-admin/admin.php?page=socialdraft-customers | 2.21 | 7.34 |
Settings /wp-admin/admin.php?page=socialdraft-admin-menu | 2.21 | 7.79 |
Reviews /wp-admin/admin.php?page=socialdraft-reviews | 2.21 | 6.12 |
Trendings /wp-admin/admin.php?page=socialdraft-trendings | 2.21 | 6.80 |
Socialdraft /wp-admin/options-general.php?page=socialdraft | 2.21 | 7.17 |
Server storage [IO: ▲0.11MB] [DB: ▲0.00MB] Passed 3 tests
How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 17 new files
Database: no new tables, 7 new options
New WordPress options |
---|
recovery_mode_email_last_sent |
widget_recent-posts |
theysaidso_admin_options |
widget_recent-comments |
db_upgraded |
can_compress_scripts |
widget_theysaidso_widget |
Browser metrics Passed 4 tests
A check of browser resources used by Socialdraft
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,824 ▲63 | 14.35 ▲0.00 | 1.75 ▲0.03 | 43.64 ▲4.93 |
Dashboard /wp-admin | 2,227 ▲46 | 5.51 ▼0.18 | 91.57 ▼8.91 | 38.16 ▼5.66 |
Posts /wp-admin/edit.php | 2,135 ▲35 | 1.95 ▼0.02 | 39.96 ▼2.20 | 35.96 ▲1.37 |
Add New Post /wp-admin/post-new.php | 1,563 ▲36 | 18.19 ▼5.13 | 624.42 ▲13.08 | 57.59 ▲4.92 |
Media Library /wp-admin/upload.php | 1,438 ▲38 | 4.17 ▼0.09 | 99.79 ▲1.49 | 44.45 ▼1.56 |
Customers /wp-admin/admin.php?page=socialdraft-customers | 856 | 1.61 | 17.81 | 27.02 |
Settings /wp-admin/admin.php?page=socialdraft-admin-menu | 747 | 1.51 | 6.68 | 20.55 |
Reviews /wp-admin/admin.php?page=socialdraft-reviews | 856 | 1.79 | 15.31 | 23.33 |
Trendings /wp-admin/admin.php?page=socialdraft-trendings | 739 | 1.51 | 6.47 | 16.84 |
Socialdraft /wp-admin/options-general.php?page=socialdraft | 752 | 1.51 | 6.77 | 22.79 |
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
You still need to fix the following
- This plugin did not uninstall without warnings or errors
- > Deprecated in wp-content/plugins/socialdraft/includes/pagination.class.php+2
Methods with the same name as their class will not be constructors in a future version of PHP; pagination has a deprecated constructor
- This plugin does not fully uninstall, leaving 7 options in the database
- theysaidso_admin_options
- db_upgraded
- recovery_mode_email_last_sent
- widget_theysaidso_widget
- widget_recent-posts
- can_compress_scripts
- widget_recent-comments
Smoke tests 0% from 4 tests
Server-side errors 0% from 1 test
🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
- 5 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=socialdraft
- > Deprecated in wp-content/plugins/socialdraft/includes/pagination.class.php+2
Methods with the same name as their class will not be constructors in a future version of PHP; pagination has a deprecated constructor
- 5 occurences, only the last one shown
- > GET request to /wp-admin/options-general.php?page=socialdraft
- > Warning in wp-includes/class-wp-hook.php+310
call_user_func_array() expects parameter 1 to be a valid callback, function 'sd_scripts' not found or invalid function name
- > GET request to /wp-admin/admin.php?page=socialdraft-customers
- > Error in wp-content/plugins/socialdraft/templates/customers.php+221
Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/socialdraft/templates/customers.php:221
Stack trace:
#0 wp-content/plugins/socialdraft/settings.php(187): include()
#1 wp-includes/class-wp-hook.php(310): Socialdraft_Settings->plugin_customers_page()
#2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#3 wp-includes/plugin.php(517): WP_Hook->do_action()
#4 wp-admin/admin.php(259): do_action()
#5 {main}
thrown- > GET request to /wp-admin/admin.php?page=socialdraft-admin-menu
- > Error in wp-admin/includes/template.php+1801
Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/socialdraft/templates/settings.php on line 30 and exactly 2 expected in wp-admin/includes/template.php:1801
Stack trace:
#0 wp-content/plugins/socialdraft/templates/settings.php(30): do_settings_fields()
#1 wp-content/plugins/socialdraft/settings.php(157): include('/var/www/wordpr...')
#2 wp-includes/class-wp-hook.php(310): Socialdraft_Settings->plugin_settings_page()
#3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#4 wp-includes/plugin.php(517): WP_Hook->do_action()
#5 wp-admin/admin.php(259): do_action()
#6 {main}
thrown- > GET request to /wp-admin/admin.php?page=socialdraft-reviews
- > Error in wp-content/plugins/socialdraft/templates/reviews.php+174
Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/socialdraft/templates/reviews.php:174
Stack trace:
#0 wp-content/plugins/socialdraft/settings.php(201): include()
#1 wp-includes/class-wp-hook.php(310): Socialdraft_Settings->plugin_reviews_page()
#2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#3 wp-includes/plugin.php(517): WP_Hook->do_action()
#4 wp-admin/admin.php(259): do_action()
#5 {main}
thrown- > GET request to /wp-admin/admin.php?page=socialdraft-trendings
- > Error in wp-content/plugins/socialdraft/templates/trendings.php+176
Uncaught Error: Cannot use object of type WP_Error as array in wp-content/plugins/socialdraft/templates/trendings.php:176
Stack trace:
#0 wp-content/plugins/socialdraft/settings.php(173): include()
#1 wp-includes/class-wp-hook.php(310): Socialdraft_Settings->plugin_trendings_page()
#2 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#3 wp-includes/plugin.php(517): WP_Hook->do_action()
#4 wp-admin/admin.php(259): do_action()
#5 {main}
thrown- > GET request to /wp-admin/options-general.php?page=socialdraft
- > Error in wp-admin/includes/template.php+1801
Uncaught ArgumentCountError: Too few arguments to function do_settings_fields(), 1 passed in wp-content/plugins/socialdraft/templates/settings.php on line 30 and exactly 2 expected in wp-admin/includes/template.php:1801
Stack trace:
#0 wp-content/plugins/socialdraft/templates/settings.php(30): do_settings_fields()
#1 wp-content/plugins/socialdraft/settings.php(157): include('/var/www/wordpr...')
#2 wp-includes/class-wp-hook.php(310): Socialdraft_Settings->plugin_settings_page()
#3 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
#4 wp-includes/plugin.php(517): WP_Hook->do_action()
#5 wp-admin/admin.php(259): do_action()
#6 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
#7 {main}
thrown
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
Almost there! Just fix the following items
- 2× PHP files perform the action of outputting non-empty strings when accessed directly:
- > /wp-content/plugins/socialdraft/templates/reviews.php
- > /wp-content/plugins/socialdraft/templates/customers.php
- 7× PHP files trigger server errors when accessed directly:
- > PHP Warning
require(../wp-load.php): failed to open stream: No such file or directory in wp-content/plugins/socialdraft/templates/settings.php on line 3
- > PHP Fatal error
require(): Failed opening required '../wp-load.php' (include_path='.:/usr/share/php') in wp-content/plugins/socialdraft/templates/settings.php on line 3
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/socialdraft/templates/customers.php:213
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/socialdraft/templates/trendings.php:170
- > PHP Fatal error
Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/socialdraft/socialdraft.php:59
- > PHP Fatal error
Uncaught Error: Call to undefined function get_post_meta() in wp-content/plugins/socialdraft/templates/post-type-template_metabox.php:7
- > PHP Fatal error
Uncaught Error: Call to undefined function get_option() in wp-content/plugins/socialdraft/templates/reviews.php:166
- > PHP Warning
User-side errors 0% from 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
- > GET request to /wp-admin/admin.php?page=socialdraft-customers
- > Javascript (severe) in unknown
/wp-admin/admin.php?page=socialdraft-customers 336:34 Uncaught TypeError: $(...).brokenImage is not a function
- > GET request to /wp-admin/admin.php?page=socialdraft-reviews
- > Javascript (severe) in unknown
/wp-admin/admin.php?page=socialdraft-reviews 290:26 Uncaught TypeError: $(...).brokenImage is not a function
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: reviews, marketing, social, plugin, socialdraft
socialdraft/socialdraft.php 92% from 13 tests
"Socialdraft" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 198 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,780 lines of code in 14 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 10 | 174 | 185 | 1,598 |
CSS | 1 | 1 | 0 | 153 |
JavaScript | 2 | 10 | 39 | 26 |
Markdown | 1 | 1 | 0 | 3 |
PHP code Passed 2 tests
A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.39 |
Average class complexity | 14.50 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 38.00 |
Average method complexity | 2.20 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 30.00 |
Code structure | ||
---|---|---|
Namespaces | 0 | |
Interfaces | 0 | |
Traits | 0 | |
Classes | 4 | |
▷ Abstract classes | 0 | 0.00% |
▷ Concrete classes | 4 | 100.00% |
▷ Final classes | 0 | 0.00% |
Methods | 45 | |
▷ Static methods | 2 | 4.44% |
▷ Public methods | 45 | 100.00% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 0 | 0.00% |
Functions | 9 | |
▷ Named functions | 9 | 100.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 2 | |
▷ Global constants | 1 | 50.00% |
▷ Class constants | 1 | 50.00% |
▷ Public constants | 1 | 100.00% |
Plugin size Passed 2 tests
Image compression Passed 2 tests
All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin