83% social-toolbar

Code Review | Social Toolbar

WordPress plugin Social Toolbar scored83%from 54 tests.

About plugin

  • Plugin page: social-toolbar
  • Plugin version: 3.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.0
  • WordPress version: 6.3.1
  • First release: Dec 2, 2011
  • Latest release: Nov 8, 2014
  • Number of updates: 48
  • Update frequency: every 23.3 days
  • Top authors: daddydesign (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

200+ active /95,579 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.81ms] Passed 4 tests

A check of server-side resources used by Social Toolbar
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.32 ▼0.33
Dashboard /wp-admin3.31 ▲0.0149.17 ▼1.93
Posts /wp-admin/edit.php3.36 ▲0.0145.46 ▼3.75
Add New Post /wp-admin/post-new.php5.89 ▲0.0185.35 ▼9.21
Media Library /wp-admin/upload.php3.24 ▲0.0135.85 ▲1.21

Server storage [IO: ▲0.73MB] [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: 27 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
social_toolbar_code
social_toolbar_values

Browser metrics Passed 4 tests

Social Toolbar: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5813.23 ▼1.144.56 ▲2.4543.73 ▲0.72
Dashboard /wp-admin2,224 ▲364.93 ▼0.92114.82 ▲2.0975.38 ▲30.64
Posts /wp-admin/edit.php2,104 ▲182.02 ▼0.0336.69 ▲0.5136.27 ▲3.07
Add New Post /wp-admin/post-new.php1,680 ▲14621.89 ▼1.14771.00 ▲87.3854.84 ▼0.02
Media Library /wp-admin/upload.php1,403 ▲124.15 ▼0.0296.86 ▼1.6266.42 ▲20.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • social_toolbar_code
    • db_upgraded
    • social_toolbar_values
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 7× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      Use of undefined constant social_toolbar_PATH - assumed 'social_toolbar_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-toolbar/options.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-toolbar/social-toolbar.php:31
    • > PHP Warning
      Use of undefined constant DD_SOCIAL_TOOLBAR_PATH - assumed 'DD_SOCIAL_TOOLBAR_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-toolbar/go_pro_ad.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/social-toolbar/our_feeds.php:3
    • > PHP Warning
      Use of undefined constant WP_CONTENT_URL - assumed 'WP_CONTENT_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-toolbar/options.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/social-toolbar/go_pro_ad.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/social-toolbar/options.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Brand your website), #2 (Make it all 1 color), #3 (IBM uses it!), #4 (Put Toolbar at top of your site), #5 (iPad responsive), #6 (RSS Feed), #7 (Custom Message Feed), #8 (Recent Tweet Feed), #9 (Mobile Responsive), #10 (General Settings), #11 (Customize Settings), #12 (Share Button Settings), #13 (Feed Settings), #14 (Installation Options)
  • Tags: Too many tags (26 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

social-toolbar/social-toolbar.php 92% from 13 tests

The main PHP script in "Social Toolbar" version 3.2 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 302 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected321 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP45025320
CSS1001

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.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
6 PNG files occupy 0.02MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/wp_social_toolbar_logo.png2.41KB1.49KB▼ 38.31%
images/x.png1.04KB1.25KB0.00%
images/DaddyDesignLogo-toolbar.png7.42KB3.69KB▼ 50.28%
images/toolslogo.png4.23KB3.53KB▼ 16.72%
images/icon.png0.28KB0.37KB0.00%