10% xbooster-social-icons-with-counter

Code Review | xBooster Social Icons with Counter

WordPress plugin xBooster Social Icons with Counter scored 10% from 54 tests.

About plugin

  • Plugin page: xbooster-social-i...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.8
  • WordPress version: 6.3.1
  • First release: Jan 5, 2014
  • Latest release: Jan 5, 2014
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: acbaltaci (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 2,019 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The following installer errors require your attention
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/xbooster-social-icons-with-counter/inc/widget-functions.php+5
    Function create_function() is deprecated

Server metrics [RAM: ▼1.79MB] [CPU: ▼56.66ms] Passed 4 tests

Analyzing server-side resources used by xBooster Social Icons with Counter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.275.32 ▼45.24
Dashboard /wp-admin2.21 ▼1.095.94 ▼43.41
Posts /wp-admin/edit.php2.21 ▼1.147.65 ▼45.69
Add New Post /wp-admin/post-new.php2.21 ▼3.676.11 ▼92.31
Media Library /wp-admin/upload.php2.21 ▼1.016.15 ▼28.40
xBooster Social Plugin /wp-admin/options-general.php?page=xbooster_social_options_handle2.217.70

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 57 new files
Database: no new tables, 15 new options
New WordPress options
xbooster_social_plugin_snps
widget_recent-comments
xbooster_social_plugin_share_ns
xbooster_display_options
xbooster_social_plugin_sns_counter_twitter
widget_recent-posts
widget_theysaidso_widget
db_upgraded
xbooster_social_plugin_snp_counter_twitter
can_compress_scripts
...

Browser metrics Passed 4 tests

Checking browser requirements for xBooster Social Icons with Counter
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,967 ▲22115.50 ▲1.125.54 ▲3.8142.91 ▼0.43
Dashboard /wp-admin2,288 ▲1006.90 ▲0.89137.82 ▲19.3539.44 ▼7.36
Posts /wp-admin/edit.php2,201 ▲1303.43 ▲1.4258.54 ▲23.2236.80 ▲3.81
Add New Post /wp-admin/post-new.php1,553 ▲2023.54 ▲0.31646.66 ▼20.2035.40 ▼16.32
Media Library /wp-admin/upload.php1,443 ▲554.82 ▲0.6392.17 ▼4.6940.30 ▲0.07
xBooster Social Plugin /wp-admin/options-general.php?page=xbooster_social_options_handle1,9863.6967.5784.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/xbooster-social-icons-with-counter/inc/widget-functions.php+5
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 15 options
    • xbooster_social_plugin_sns_counter_facebook
    • xbooster_social_plugin_sns_counter_twitter
    • xbooster_social_plugin_snp_counter_twitter
    • db_upgraded
    • can_compress_scripts
    • xbooster_display_options
    • widget_xbooster_social_profiles_widget
    • widget_xbooster_social_share_widget
    • xbooster_social_plugin_snps
    • xbooster_social_plugin_snp_counter_facebook
    • ...

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
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=xbooster_social_options_handle
    • > Deprecated in wp-content/plugins/xbooster-social-icons-with-counter/inc/widget-functions.php+6
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=xbooster_social_options_handle
    • > Deprecated in wp-content/plugins/xbooster-social-icons-with-counter/inc/apis.php+43
    Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)`

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/xbooster-social-icons-with-counter/admin/admin-sharing-stats.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/xbooster-social-icons-with-counter/admin/admin-dashboard.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/xbooster-social-icons-with-counter/inc/content-render-functions.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/xbooster-social-icons-with-counter/admin/admin-sidebar.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/xbooster-social-icons-with-counter/admin/admin-display-options.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xbooster-social-icons-with-counter/inc/ajax-functions.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/xbooster-social-icons-with-counter/admin/admin-social-network-profiles.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/xbooster-social-icons-with-counter/admin/admin-social-sharing.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/xbooster-social-icons-with-counter/inc/script-style-loader.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/xbooster-social-icons-with-counter/admin/admin-first.php:2

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 Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: social network sharing, social counter, addthis, social profiles, social networking...

xbooster-social-icons-with-counter/xbooster-social-icons-with-counter.php Passed 13 tests

The main PHP file in "xBooster Social Icons with Counter" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
48 characters long description:
Adds SVG Social Sharing Icons anywhere you want.

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
There were no executable files found in this plugin6,501 lines of code in 41 files:
LanguageFilesBlank linesComment linesLines of code
SVG192173,681
PHP14776781,674
CSS4263163802
PO File18184204
JavaScript3017140

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity17.00
▷ Minimum class complexity15.00
▷ Maximum class complexity21.00
Average method complexity2.85
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods26
▷ Static methods623.08%
▷ Public methods1973.08%
▷ Protected methods00.00%
▷ Private methods726.92%
Functions16
▷ Named functions16100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
14 PNG files occupy 0.26MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/datatables/sort_desc_disabled.png1.02KB0.25KB▼ 75.98%
assets/images/datatables/forward_enabled_hover.png3.16KB0.58KB▼ 81.66%
assets/images/xbooster-icon.png1.68KB0.94KB▼ 44.00%
(invalid) assets/images/icons.png214.16KB0.00KB▼ 100.00%
assets/images/datatables/sort_asc.png2.86KB0.25KB▼ 91.39%