73% svensoft-social-share-buttons

Code Review | Кнопки социальных сетей

WordPress plugin Кнопки социальных сетей scored73%from 54 tests.

About plugin

  • Plugin page: svensoft-social-s...
  • Plugin version: 1.1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 23, 2014
  • Latest release: Jul 23, 2014
  • Number of updates: 19
  • Update frequency: every 0.1 days
  • Top authors: SvenSoft (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

200+ active /17,625 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼7.77ms] Passed 4 tests

This is a short check of server-side resources used by Кнопки социальных сетей
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.78 ▼0.28
Dashboard /wp-admin3.34 ▲0.0349.77 ▼5.18
Posts /wp-admin/edit.php3.39 ▲0.0348.76 ▼2.66
Add New Post /wp-admin/post-new.php5.92 ▲0.0389.72 ▼22.14
Media Library /wp-admin/upload.php3.26 ▲0.0338.93 ▼1.10
Поделитьсся в социальных сетях /wp-admin/options-general.php?page=svensoft_social_share_buttons_menu3.2530.22

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Кнопки социальных сетей
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,912 ▲16613.59 ▼0.808.93 ▲7.2044.23 ▲4.49
Dashboard /wp-admin2,210 ▲224.85 ▼1.05107.01 ▼1.9642.27 ▼2.69
Posts /wp-admin/edit.php2,096 ▲42.03 ▲0.0539.84 ▼1.8836.88 ▼1.05
Add New Post /wp-admin/post-new.php1,545 ▲3118.20 ▲0.70628.16 ▼58.1155.79 ▼6.27
Media Library /wp-admin/upload.php1,386 ▼24.21 ▲0.0096.16 ▼21.0040.75 ▼8.13
Поделитьсся в социальных сетях /wp-admin/options-general.php?page=svensoft_social_share_buttons_menu8802.0222.1431.53

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 25% 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)
These server-side errors were triggered
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=svensoft_social_share_buttons_menu
    • > Notice in wp-content/plugins/svensoft-social-share-buttons/templates/template-options-form.php+34
    Trying to access array offset on value of type bool

SRP 0% 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 fix the following
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/svensoft-social-share-buttons/templates/template-social-buttons.php
    • > /wp-content/plugins/svensoft-social-share-buttons/1.1.0.1/templates/template-social-buttons.php
  • 16× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/svensoft-social-share-buttons/svensoft-social-share-buttons.php:63
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/svensoft-social-share-buttons/templates/template-social-buttons.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/svensoft-social-share-buttons/1.1.0.1/templates/template-options-form.php:8
    • > PHP Notice
      Undefined variable: image_share in wp-content/plugins/svensoft-social-share-buttons/templates/template-social-buttons.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/svensoft-social-share-buttons/1.1.0.1/svensoft-social-share-buttons.php:63
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/svensoft-social-share-buttons/1.1.0.1/templates/template-social-buttons.php on line 1
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/svensoft-social-share-buttons/1.1.0.1/templates/template-social-buttons.php on line 1
    • > PHP Notice
      Undefined variable: excerpt in wp-content/plugins/svensoft-social-share-buttons/1.1.0.1/templates/template-social-buttons.php on line 5
    • > PHP Notice
      Undefined variable: image_share in wp-content/plugins/svensoft-social-share-buttons/1.1.0.1/templates/template-social-buttons.php on line 4
    • > PHP Notice
      Undefined variable: title in wp-content/plugins/svensoft-social-share-buttons/1.1.0.1/templates/template-social-buttons.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 97% 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 need to be fixed:
  • Donate link: Invalid URI found ("")
The official readme.txt might help

svensoft-social-share-buttons/svensoft-social-share-buttons.php Passed 13 tests

"Кнопки социальных сетей" version 1.1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
109 characters long description:
Плагин создает shortcode кнопок "Поделиться в социальных сетях".

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected447 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP45193233
CSS210112
JavaScript23822102

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity21.00
▷ Minimum class complexity21.00
▷ Maximum class complexity21.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2071.43%
▷ Protected methods621.43%
▷ Private methods27.14%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.29MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png31.14KB17.38KB▼ 44.18%
1.1.0.1/screenshot-1.png31.14KB17.38KB▼ 44.18%
1.1.0.1/images/placeholder__.png3.55KB1.97KB▼ 44.34%
images/placeholder__.png3.55KB1.97KB▼ 44.34%
1.1.0.1/images/placeholder.png10.96KB4.68KB▼ 57.32%