79% shariff

Code Review | Shariff Wrapper

WordPress plugin Shariff Wrapper scored 79% from 54 tests.

About plugin

  • Plugin page: shariff
  • Plugin version: 4.6.9
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.1
  • WordPress version: 6.3.1
  • First release: Dec 1, 2014
  • Latest release: Dec 20, 2022
  • Number of updates: 271
  • Update frequency: every 10.9 days
  • Top authors: starguide (57.93%)3UU (42.44%)

Code review

54 tests

User reviews

98 reviews

Install metrics

50,000+ active / 811,063 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

Server-side resources used by Shariff Wrapper
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.01 ▲1.60
Dashboard /wp-admin3.38 ▲0.0849.01 ▲2.57
Posts /wp-admin/edit.php3.43 ▲0.0844.19 ▼0.50
Add New Post /wp-admin/post-new.php6.01 ▲0.1285.11 ▼2.43
Media Library /wp-admin/upload.php3.31 ▲0.0833.26 ▲1.57
Shariff /wp-admin/options-general.php?page=shariff3uu3.3036.04

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 55 new files
Database: no new tables, 11 new options
New WordPress options
shariff3uu_advanced
widget_shariff
shariff3uu_design
shariff3uu_basic
shariff3uu_statistic
db_upgraded
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Checking browser requirements for Shariff Wrapper
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1514.75 ▼0.061.61 ▼0.2637.51 ▼8.54
Dashboard /wp-admin2,213 ▲74.82 ▼0.9896.81 ▲1.5739.07 ▼1.68
Posts /wp-admin/edit.php2,093 ▲42.00 ▼0.0235.01 ▲1.5836.30 ▲2.19
Add New Post /wp-admin/post-new.php6,511 ▲4,97820.45 ▼2.76976.63 ▲286.1557.63 ▼0.03
Media Library /wp-admin/upload.php1,392 ▲74.19 ▼0.0194.95 ▼5.7845.80 ▼4.44
Shariff /wp-admin/options-general.php?page=shariff3uu1,0673.1639.7433.94

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/shariff/bitcoin.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined index: bitcoinaddress in wp-content/plugins/shariff/bitcoin.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/shariff/includes/class-shariff-widget.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
5 plugin tags: gdpr, sharing, share buttons, dsgvo, shariff

shariff/shariff.php Passed 13 tests

Analyzing the main PHP file in "Shariff Wrapper" version 4.6.9
130 characters long description:
Shariff provides share buttons that respect the privacy of your visitors and follow the General Data Protection Regulation (GDPR).

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
No dangerous file extensions were detected7,638 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP401,4142,0817,159
CSS2018360
JavaScript6045107
XML10012

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity23.39
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity3.72
▷ Minimum method complexity1.00
▷ Maximum method complexity19.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods148
▷ Static methods6946.62%
▷ Public methods14497.30%
▷ Protected methods00.00%
▷ Private methods42.70%
Functions103
▷ Named functions103100.00%
▷ Anonymous functions00.00%
Constants33
▷ Global constants33100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/borderradius.png9.02KB3.80KB▼ 57.90%
images/shariff_designs.png22.68KB9.29KB▼ 59.02%
images/defaultHint.png15.76KB7.39KB▼ 53.11%