84% minimal-share-buttons

Code Review | Minimal Share Buttons

WordPress plugin Minimal Share Buttons scored 84% from 54 tests.

About plugin

  • Plugin page: minimal-share-but...
  • Plugin version: 1.6.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 10, 2017
  • Latest release: Mar 6, 2022
  • Number of updates: 41
  • Update frequency: every 40.7 days
  • Top authors: gonzomir (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

200+ active / 3,248 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

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

Analyzing server-side resources used by Minimal Share Buttons
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0445.06 ▲0.43
Dashboard /wp-admin3.34 ▲0.0449.32 ▼4.85
Posts /wp-admin/edit.php3.39 ▲0.0351.83 ▲3.21
Add New Post /wp-admin/post-new.php5.92 ▲0.0484.96 ▼14.88
Media Library /wp-admin/upload.php3.26 ▲0.0340.05 ▲1.59
Share Options /wp-admin/options-general.php?page=minimal-share-buttons3.2338.77

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 27 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_minimal_share_buttons
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Minimal Share Buttons: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,833 ▲9813.25 ▼1.162.51 ▲0.6543.17 ▼1.53
Dashboard /wp-admin2,210 ▲255.86 ▲0.92107.02 ▲1.0339.36 ▲0.58
Posts /wp-admin/edit.php2,093 ▲42.06 ▲0.0238.87 ▲3.4336.28 ▲4.25
Add New Post /wp-admin/post-new.php6,417 ▲4,89820.52 ▼2.92946.90 ▲237.7454.33 ▼0.51
Media Library /wp-admin/upload.php1,395 ▲44.20 ▲0.08109.89 ▲6.1950.41 ▲2.55
Share Options /wp-admin/options-general.php?page=minimal-share-buttons9182.0521.4528.41

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_minimal_share_buttons
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

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 errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minimal-share-buttons/blocks/index.php:63
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/minimal-share-buttons/inc/class-minimal-share-buttons.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/minimal-share-buttons/minimal-share-buttons.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/minimal-share-buttons/inc/settings.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
6 plugin tags: share buttons, social media, twitter, linkedin, social sharing...

minimal-share-buttons/minimal-share-buttons.php Passed 13 tests

This is the main PHP file of "Minimal Share Buttons" version 1.6.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
79 characters long description:
A social share plugin that doesn't spy on users and doesn't slow down you site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin762 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP5110210536
JavaScript413092
CSS111076
HTML12042
SVG110016

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity12.00
▷ Minimum class complexity10.00
▷ Maximum class complexity14.00
Average method complexity1.79
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods1062.50%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions15
▷ Named functions1386.67%
▷ Anonymous functions213.33%
Constants2
▷ Global constants2100.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
PNG images were not found in this plugin