10% bst-share-it

Code Review | BST share iT

WordPress plugin BST share iT scored10%from 54 tests.

About plugin

  • Plugin page: bst-share-it
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.0-4.9.1
  • WordPress version: 6.3.1
  • First release: Aug 20, 2015
  • Latest release: Dec 17, 2017
  • Number of updates: 49
  • Update frequency: every 17.4 days
  • Top authors: amargolf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,584 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
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/bst-share-it/includes/bst_share_it_widget.php+645
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼55.90ms] Passed 4 tests

Server-side resources used by BST share iT
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.435.32 ▼35.80
Dashboard /wp-admin2.05 ▼1.267.10 ▼42.11
Posts /wp-admin/edit.php2.05 ▼1.317.19 ▼46.22
Add New Post /wp-admin/post-new.php2.05 ▼3.845.82 ▼98.68
Media Library /wp-admin/upload.php2.05 ▼1.185.63 ▼36.59
BST share iT /wp-admin/options-general.php?page=bst_share_it-options2.056.29

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 117 new files
Database: no new tables, 9 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_bst_share_it
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
bst_share_it_options_tab_2
bst_share_it_options_tab_1
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for BST share iT
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,971 ▲21014.55 ▼0.174.96 ▲3.2343.43 ▲0.77
Dashboard /wp-admin2,347 ▲1796.21 ▲0.67116.36 ▲22.6593.28 ▲50.96
Posts /wp-admin/edit.php2,278 ▲1783.37 ▲1.3753.89 ▲14.6263.70 ▲26.98
Add New Post /wp-admin/post-new.php6,338 ▲4,81219.04 ▼4.00918.18 ▲239.4540.07 ▼14.40
Media Library /wp-admin/upload.php1,412 ▲124.11 ▼0.0585.23 ▼17.8876.03 ▲28.60
BST share iT /wp-admin/options-general.php?page=bst_share_it-options1,3763.1240.6461.57

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/bst-share-it/includes/bst_share_it_widget.php+645
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=bst_share_it-options
    • > Deprecated in wp-content/plugins/bst-share-it/includes/bst_share_it_widget.php+645
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=bst_share_it-options
    • > User deprecated in wp-includes/functions.php+5546
    The called constructor method for WP_Widget class in bst_share_it is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 6× 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/bst-share-it/includes/bst_share_it_global_options.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/bst-share-it/includes/bst_share_it_admin_metabox_uplader.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bst-share-it/includes/bst_share_it_widget.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bst-share-it/includes/bst_share_it_admin_metabox_buttons.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/bst-share-it/bst-share-it.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/bst-share-it/includes/bst_share_it_admin.php:756

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% 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
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (See the nice looking buttons in default style.), #2 (See the nice looking buttons in in a simple flat style.), #3 (The BSTshareiT options page 1.), #4 (The BSTshareiT options page 2.)
  • Tags: Too many tags (99 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can look at the official readme.txt

bst-share-it/bst-share-it.php Passed 13 tests

The entry point to "BST share iT" version 1.0.9 is a PHP file that has certain tags in its header comment area
113 characters long description:
BSTshareiT - Die Social-Sharing-Buttons die nicht nach Hause telefonieren und geltendes deutsches Recht beachten.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin3,803 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP116413611,940
CSS523140918
JavaScript516768722
PO File15921,975199
JSON10015
HTML1009

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity12.00
▷ Minimum class complexity12.00
▷ Maximum class complexity12.00
Average method complexity3.75
▷ Minimum method complexity1.00
▷ Maximum method complexity11.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%
Functions59
▷ Named functions59100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants5100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
84 PNG files occupy 0.33MB with 0.12MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/style1/gplus_grey.png4.92KB3.55KB▼ 27.93%
img/simple1/facebook.png1.91KB0.97KB▼ 49.00%
img/simple1/pin.png1.97KB1.03KB▼ 47.52%
img/style2/pin_grey.png2.44KB1.62KB▼ 33.69%
img/style2/facebook_like_grey.png2.71KB2.16KB▼ 20.38%