78% sharekar

Code Review | Sharekar : Social Media Share Button

WordPress plugin Sharekar : Social Media Share Button scored78%from 54 tests.

About plugin

  • Plugin page: sharekar
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2
  • WordPress version: 6.3.1
  • First release: Nov 29, 2022
  • Latest release: May 20, 2023
  • Number of updates: 19
  • Update frequency: every 9.1 days
  • Top authors: madhavsingh07 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /372 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼11.06ms] Passed 4 tests

This is a short check of server-side resources used by Sharekar : Social Media Share Button
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.80 ▼4.05
Dashboard /wp-admin3.36 ▲0.0153.15 ▼16.10
Posts /wp-admin/edit.php3.47 ▲0.1254.61 ▲2.89
Add New Post /wp-admin/post-new.php5.96 ▲0.0796.16 ▼23.17
Media Library /wp-admin/upload.php3.28 ▲0.0537.05 ▼0.93
Settings /wp-admin/admin.php?page=sharekar3.3835.89
Web Share New /wp-admin/admin.php?page=sharekar_webshare3.2936.42

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options
sharekar_version

Browser metrics Passed 4 tests

Checking browser requirements for Sharekar : Social Media Share Button
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9114.36 ▼0.231.61 ▼0.2143.47 ▲1.15
Dashboard /wp-admin2,243 ▲664.86 ▼0.7297.72 ▼6.2543.07 ▼5.14
Posts /wp-admin/edit.php2,134 ▲342.36 ▲0.4243.20 ▲5.7540.16 ▲3.95
Add New Post /wp-admin/post-new.php6,232 ▲4,70419.15 ▼4.03888.30 ▲203.7036.67 ▼16.08
Media Library /wp-admin/upload.php1,452 ▲524.53 ▲0.4191.47 ▼22.9740.33 ▼6.22
Settings /wp-admin/admin.php?page=sharekar1,8212.5253.7636.28
Web Share New /wp-admin/admin.php?page=sharekar_webshare1,0682.5642.2937.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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 items
  • 9× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/sharekar/front.php
    • > /wp-content/plugins/sharekar/social.php
    • > /wp-content/plugins/sharekar/web-share-settings.php
    • > /wp-content/plugins/sharekar/main.php
    • > /wp-content/plugins/sharekar/settings-view.php
    • > /wp-content/plugins/sharekar/settings.php
    • > /wp-content/plugins/sharekar/sharecount.php
    • > /wp-content/plugins/sharekar/web-share.php
    • > /wp-content/plugins/sharekar/click_to_tweet.php
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/sharekar/sharekar.php:18

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
9 plugin tags: sharing, sharing icons, sharing buttons, share, social share...

sharekar/sharekar.php 85% from 13 tests

The primary PHP file in "Sharekar : Social Media Share Button" version 1.0.2 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.6" instead of "7.3")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

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
Success! There were no dangerous files found in this plugin2,121 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP11497331,841
JavaScript3203193
CSS216586
Markdown1001

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.54
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%
Functions71
▷ Named functions71100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
There are no PNG files in this plugin