10% socialmyblog

Code Review | SocialMyBlog

WordPress plugin SocialMyBlog scored10%from 54 tests.

About plugin

  • Plugin page: socialmyblog
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0.2-3.3
  • WordPress version: 6.3.1
  • First release: Mar 12, 2012
  • Latest release: Mar 12, 2012
  • Number of updates: 14
  • Update frequency: N/A
  • Top authors: gmoorealberta (85.71%)podz (21.43%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,262 total downloads

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
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/socialmyblog/socialmyblog-widget.php+2
    Methods with the same name as their class will not be constructors in a future version of PHP; socialIcons has a deprecated constructor

Server metrics [RAM: ▼1.72MB] [CPU: ▼45.85ms] Passed 4 tests

An overview of server-side resources used by SocialMyBlog
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.189.93 ▼26.60
Dashboard /wp-admin2.29 ▼1.0510.95 ▼47.20
Posts /wp-admin/edit.php2.29 ▼1.0610.05 ▼35.38
Add New Post /wp-admin/post-new.php2.29 ▼3.5910.80 ▼74.22
Media Library /wp-admin/upload.php2.29 ▼0.9311.02 ▼24.73
Social My Blog Settings /wp-admin/options-general.php?page=bk-socialmyblog2.299.40

Server storage [IO: ▲0.07MB] [DB: ▲0.00MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_my_widget_base
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for SocialMyBlog
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲7113.32 ▼1.041.69 ▲0.0337.87 ▼8.40
Dashboard /wp-admin2,207 ▲195.84 ▼0.0695.70 ▼6.6739.03 ▼3.79
Posts /wp-admin/edit.php2,090 ▲12.03 ▲0.0233.71 ▼0.9233.60 ▼0.50
Add New Post /wp-admin/post-new.php1,522 ▼1323.08 ▼0.19637.44 ▼38.4150.32 ▼15.04
Media Library /wp-admin/upload.php1,389 ▲14.23 ▲0.10113.62 ▲3.0448.52 ▲1.76
Social My Blog Settings /wp-admin/options-general.php?page=bk-socialmyblog8142.0624.6526.52

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in socialIcons is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_my_widget_base
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% 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)
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=bk-socialmyblog
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in socialIcons is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=bk-socialmyblog
    • > Notice in wp-content/plugins/socialmyblog/socialmyblog-admin.php+2
    Undefined index: socialmyblog_hidden

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
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/socialmyblog/socialmyblog-admin.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/socialmyblog/socialmyblog-widget.php:2
    • > PHP Notice
      Undefined index: socialmyblog_hidden in wp-content/plugins/socialmyblog/socialmyblog-admin.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/socialmyblog/socialmyblog-widget.php:2

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 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
  • Screenshots: These screenshots do not have images: #1 (Settings Page), #2 (Buttons after post body), #3 (Widget in action)
The official readme.txt is a good inspiration

socialmyblog/socialmyblog-media.php 85% from 13 tests

The principal PHP file in "SocialMyBlog" v. 1.2 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 148 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("socialmyblog.php" instead of "socialmyblog-media.php")

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
Success! There were no dangerous files found in this plugin256 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP36537179
CSS120077

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
13 PNG files occupy 0.06MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/set_1/flikr.png0.81KB0.86KB0.00%
images/set_1/vimeo.png2.04KB1.30KB▼ 36.08%
images/set_1/mail.png1.01KB0.95KB▼ 5.89%
screenshot-3.png12.40KB3.05KB▼ 75.40%
images/set_1/facebook.png0.83KB0.91KB0.00%