Benchmarks
Plugin footprint 40% from 16 tests
Installer 0% from 1 test
🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
- The plugin did not install without errors
- > Deprecated in wp-content/plugins/social-news-center/includes/htmlwrap.php+116
Array and string offset access syntax with curly braces is deprecated
Server metrics [RAM: ▼1.44MB] [CPU: ▼51.69ms] Passed 4 tests
An overview of server-side resources used by Social News Center
No issues were detected with server-side resource usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.54 ▼0.92 | 7.76 ▼37.59 |
Dashboard /wp-admin | 2.56 ▼0.74 | 9.16 ▼48.82 |
Posts /wp-admin/edit.php | 2.56 ▼0.79 | 9.86 ▼33.41 |
Add New Post /wp-admin/post-new.php | 2.56 ▼3.32 | 8.69 ▼86.95 |
Media Library /wp-admin/upload.php | 2.56 ▼0.67 | 9.61 ▼24.46 |
Server storage [IO: ▲1.22MB] [DB: ▲0.00MB] Passed 3 tests
Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 187 new files
Database: 3 new tables, 29 new options
New tables |
---|
snc_networks |
snc_api_usage_stats |
snc_user_access |
New WordPress options |
---|
snc_default_cookie_timeout |
snc_twitter_consumer_key |
snc_layout_style |
snc_posts_per_account_popup |
snc_instagram_access_token |
db_upgraded |
snc_twitter_retweets |
snc_posts_total_maximum |
snc_instagram_client_secret |
snc_twitter_consumer_secret |
... |
Browser metrics Passed 4 tests
Checking browser requirements for Social News Center
Normal browser usage
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,958 ▲187 | 13.88 ▼0.87 | 10.06 ▲7.84 | 42.79 ▼2.95 |
Dashboard /wp-admin | 2,238 ▲47 | 5.01 ▼0.80 | 107.73 ▲1.74 | 40.38 ▼0.41 |
Posts /wp-admin/edit.php | 2,124 ▲35 | 2.48 ▲0.46 | 35.22 ▼2.29 | 33.07 ▼0.73 |
Add New Post /wp-admin/post-new.php | 1,543 ▲10 | 22.48 ▼0.60 | 682.55 ▲45.20 | 38.03 ▼12.79 |
Media Library /wp-admin/upload.php | 1,423 ▲35 | 4.42 ▲0.24 | 94.10 ▼4.91 | 44.12 ▼0.46 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/social-news-center/includes/htmlwrap.php+116
Array and string offset access syntax with curly braces is deprecated
- The uninstall procedure has failed, leaving 6 options in the database
- can_compress_scripts
- widget_theysaidso_widget
- db_upgraded
- theysaidso_admin_options
- widget_recent-comments
- widget_recent-posts
Smoke tests 50% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test
SRP 0% 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
Please fix the following items
- 1× GET requests to PHP files return non-empty strings:
- > /wp-content/plugins/social-news-center/social-news-center.php
- 35× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
- > PHP Fatal error
Uncaught Error: Class 'Facebook\\GraphObject' not found in wp-content/plugins/social-news-center/facebook/GraphPage.php:31
- > PHP Fatal error
Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/social-news-center/includes/config-wp.php:9
- > PHP Fatal error
require(): Failed opening required 'wp-content/plugins/social-news-center/twitter/twitteroauth/tests/../vendor/autoload.php' (include_path='.:/usr/share/php') in wp-content/plugins/social-news-center/twitter/twitteroauth/tests/bootstrap.php on line 3
- > PHP Fatal error
Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/social-news-center/twitter/twitteroauth/tests/Util/JsonDecoderTest.php:7
- > PHP Fatal error
Uncaught Error: Class 'Facebook\\FacebookRequestException' not found in wp-content/plugins/social-news-center/facebook/FacebookPermissionException.php:30
- > PHP Warning
Use of undefined constant WP_DEBUG - assumed 'WP_DEBUG' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-news-center/includes/config-wp.php on line 8
- > PHP Fatal error
Uncaught Error: Class 'Facebook\\FacebookRequestException' not found in wp-content/plugins/social-news-center/facebook/FacebookAuthorizationException.php:30
- > PHP Warning
Use of undefined constant SNC_BASE_PATH - assumed 'SNC_BASE_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-news-center/includes/config.php on line 21
- > PHP Fatal error
Uncaught Error: Class 'Facebook\\FacebookSignedRequestFromInputHelper' not found in wp-content/plugins/social-news-center/facebook/FacebookJavaScriptLoginHelper.php:32
- > PHP Fatal error
Uncaught Error: Class 'Facebook\\FacebookRequestException' not found in wp-content/plugins/social-news-center/facebook/FacebookThrottleException.php:30
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test
Optimizations
Plugin configuration 96% from 29 tests
readme.txt Passed 16 tests
Often overlooked, readme.txt is one of the most important files in your plugin
10 plugin tags: social networks, social media, display tweets, social news, display photos...
social-news-center/social-news-center.php 92% from 13 tests
"Social News Center" version 0.0.8's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
- Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 286 characters long)
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin8,800 lines of code in 78 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 63 | 1,702 | 4,741 | 7,410 |
CSS | 2 | 99 | 30 | 670 |
JavaScript | 9 | 142 | 329 | 651 |
JSON | 1 | 0 | 0 | 34 |
Markdown | 2 | 7 | 0 | 25 |
XML | 1 | 1 | 0 | 10 |
PHP code Passed 2 tests
A brief analysis of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.30 |
Average class complexity | 6.18 |
▷ Minimum class complexity | 1.00 |
▷ Maximum class complexity | 27.00 |
Average method complexity | 1.82 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 25.00 |
Code structure | ||
---|---|---|
Namespaces | 7 | |
Interfaces | 1 | |
Traits | 0 | |
Classes | 48 | |
▷ Abstract classes | 3 | 6.25% |
▷ Concrete classes | 45 | 93.75% |
▷ Final classes | 0 | 0.00% |
Methods | 318 | |
▷ Static methods | 45 | 14.15% |
▷ Public methods | 292 | 91.82% |
▷ Protected methods | 13 | 4.09% |
▷ Private methods | 13 | 4.09% |
Functions | 84 | |
▷ Named functions | 81 | 96.43% |
▷ Anonymous functions | 3 | 3.57% |
Constants | 45 | |
▷ Global constants | 37 | 82.22% |
▷ Class constants | 8 | 17.78% |
▷ Public constants | 8 | 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
99 PNG files occupy 0.21MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/icon_favorited.png | 0.57KB | 0.52KB | ▼ 8.97% |
images/twitter/retweet_on.png | 0.22KB | 0.31KB | 0.00% |
images/facebook/FB-f-Logo__blue_57.png | 1.42KB | 0.41KB | ▼ 71.20% |
images/twitter/retweet_white.png | 0.28KB | 0.23KB | ▼ 15.79% |
images/facebook/FB-f-Logo__blue_50.png | 1.37KB | 0.35KB | ▼ 74.41% |