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 cannot be installed
- > Deprecated in wp-content/plugins/socialshare/plugin.php+240
Function create_function() is deprecated
Server metrics [RAM: ▼1.96MB] [CPU: ▼54.69ms] Passed 4 tests
A check of server-side resources used by Social Share
Normal server usage
Page | Memory (MB) | CPU Time (ms) |
---|---|---|
Home / | 2.03 ▼1.44 | 5.28 ▼36.16 |
Dashboard /wp-admin | 2.05 ▼1.26 | 5.97 ▼45.17 |
Posts /wp-admin/edit.php | 2.05 ▼1.31 | 6.33 ▼44.31 |
Add New Post /wp-admin/post-new.php | 2.05 ▼3.84 | 5.43 ▼93.10 |
Media Library /wp-admin/upload.php | 2.05 ▼1.18 | 6.12 ▼31.17 |
Server storage [IO: ▲0.72MB] [DB: ▲0.00MB] Passed 3 tests
Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 7 new options
New WordPress options |
---|
can_compress_scripts |
widget_recent-posts |
theysaidso_admin_options |
db_upgraded |
widget_socialshare |
widget_theysaidso_widget |
widget_recent-comments |
Browser metrics Passed 4 tests
An overview of browser requirements for Social Share
This plugin has a minimal impact on browser resources
Page | Nodes | Memory (MB) | Script (ms) | Layout (ms) |
---|---|---|---|---|
Home / | 2,831 ▲85 | 13.57 ▼0.71 | 2.13 ▼0.16 | 45.33 ▲0.26 |
Dashboard /wp-admin | 2,211 ▲23 | 4.85 ▼1.06 | 104.45 ▼11.34 | 40.61 ▼3.31 |
Posts /wp-admin/edit.php | 2,091 ▼1 | 2.00 ▼0.12 | 38.05 ▼3.81 | 34.17 ▼4.44 |
Add New Post /wp-admin/post-new.php | 1,516 ▼3 | 17.38 ▼5.74 | 691.19 ▲22.41 | 58.82 ▲6.82 |
Media Library /wp-admin/upload.php | 1,393 ▲5 | 4.10 ▼0.11 | 109.10 ▼7.56 | 47.18 ▼3.97 |
Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests
🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
- Uninstall procedure had uncaught errors
- > Deprecated in wp-content/plugins/socialshare/plugin.php+240
Function create_function() is deprecated
- This plugin did not uninstall successfully, leaving 7 options in the database
- widget_recent-comments
- widget_recent-posts
- db_upgraded
- widget_socialshare
- theysaidso_admin_options
- widget_theysaidso_widget
- can_compress_scripts
Smoke tests 75% from 4 tests
Server-side errors Passed 1 test
🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test
SRP 50% from 2 tests
🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
- 4× PHP files trigger server errors when accessed directly:
- > PHP Fatal error
Uncaught Error: Call to undefined function _e() in wp-content/plugins/socialshare/views/widget.php:7
- > PHP Fatal error
Uncaught Error: Using $this when not in object context in wp-content/plugins/socialshare/views/admin.php:7
- > PHP Fatal error
Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/socialshare/plugin.php:29
- > PHP Notice
Undefined variable: twitterurl in wp-content/plugins/socialshare/views/widget.php on line 7
- > PHP Fatal error
User-side errors Passed 1 test
🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected
Optimizations
Plugin configuration 93% from 29 tests
readme.txt 94% from 16 tests
The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
- Screenshots: Please add an image for screenshot #1 (the Widget [Full Image](http://www.dropbox.com/s/is6xcywet3x5euz/screenshot-1.png))
socialshare/plugin.php 92% from 13 tests
Analyzing the main PHP file in "Social Share" version 1.0
It is important to fix the following:
- Main file name: The principal plugin file should be the same as the plugin slug ("socialshare.php" instead of "plugin.php")
Code Analysis Passed 3 tests
File types Passed 1 test
🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin201 lines of code in 5 files:
Language | Files | Blank lines | Comment lines | Lines of code |
---|---|---|---|---|
PHP | 3 | 63 | 102 | 165 |
CSS | 2 | 1 | 5 | 36 |
PHP code Passed 2 tests
This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity | |
---|---|
Average complexity per logical line of code | 0.15 |
Average class complexity | 12.00 |
▷ Minimum class complexity | 12.00 |
▷ Maximum class complexity | 12.00 |
Average method complexity | 2.57 |
▷ Minimum method complexity | 1.00 |
▷ Maximum method complexity | 6.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 | 7 | |
▷ Static methods | 0 | 0.00% |
▷ Public methods | 4 | 57.14% |
▷ Protected methods | 0 | 0.00% |
▷ Private methods | 3 | 42.86% |
Functions | 0 | |
▷ Named functions | 0 | 0.00% |
▷ Anonymous functions | 0 | 0.00% |
Constants | 6 | |
▷ Global constants | 3 | 50.00% |
▷ Class constants | 3 | 50.00% |
▷ Public constants | 3 | 100.00% |
Plugin size 50% from 2 tests
Image compression 50% from 2 tests
It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.71MB with 0.37MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant | |||
---|---|---|---|
File | Size - original | Size - compressed | Savings |
images/share-pinterest.png | 8.26KB | 3.98KB | ▼ 51.82% |
screenshot-1.png | 693.55KB | 239.51KB | ▼ 65.47% |
images/share-facebook.png | 5.75KB | 3.28KB | ▼ 42.93% |
images/share-googleplus.png | 8.91KB | 4.84KB | ▼ 45.74% |
images/share-twitter.png | 8.81KB | 4.15KB | ▼ 52.83% |