72% shareaholic

Code Review | Professional Social Sharing Buttons, Icons & Related Posts - Shareaholic

WordPress plugin Professional Social Sharing Buttons, Icons & Related Posts - Shareaholic scored72%from 54 tests.

About plugin

  • Plugin page: shareaholic
  • Plugin version: 9.7.10
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.4
  • WordPress version: 6.3.1
  • First release: Jan 13, 2012
  • Latest release: Dec 1, 2023
  • Number of updates: 333
  • Update frequency: every 13.0 days
  • Top authors: shareaholic (94.29%)hngu_shareaholic (6.01%)

Code review

54 tests

User reviews

1025 reviews

Install metrics

30,000+ active /4,750,190 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.87MB] [CPU: ▲2.12ms] 75% from 4 tests

A check of server-side resources used by Professional Social Sharing Buttons, Icons & Related Posts - Shareaholic
The following require your attention
  • CPU: Try to keep total CPU usage under 500.00ms (currently 611.83ms on /wp-admin/admin.php?page=shareaholic-settings-plugin)
PageMemory (MB)CPU Time (ms)
Home /4.36 ▲0.9040.71 ▲0.78
Dashboard /wp-admin4.19 ▲0.8455.31 ▼3.34
Posts /wp-admin/edit.php4.24 ▲0.8855.15 ▲9.67
Add New Post /wp-admin/post-new.php6.79 ▲0.91105.90 ▲4.73
Media Library /wp-admin/upload.php4.11 ▲0.8842.61 ▲6.30
Cloud Settings /wp-admin/admin.php?page=shareaholic-settings4.0238.99
Plugin Settings /wp-admin/admin.php?page=shareaholic-settings-plugin4.14611.83
In-Page Code Blocks /wp-admin/admin.php?page=shareaholic-settings-code-blocks4.0638.72

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 122 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
shareaholic_settings
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Professional Social Sharing Buttons, Icons & Related Posts - Shareaholic
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,882 ▲12014.57 ▼0.131.57 ▼0.2737.87 ▼4.97
Dashboard /wp-admin2,272 ▲955.67 ▲0.0590.70 ▲3.0686.02 ▲46.42
Posts /wp-admin/edit.php2,184 ▲841.98 ▲0.0339.63 ▲0.0534.85 ▼1.00
Add New Post /wp-admin/post-new.php6,457 ▲4,92827.18 ▲3.97850.45 ▲256.9454.74 ▼4.56
Media Library /wp-admin/upload.php1,480 ▲804.21 ▲0.04107.09 ▲11.6045.21 ▲2.63
Cloud Settings /wp-admin/admin.php?page=shareaholic-settings1,0483.2384.5576.96
Plugin Settings /wp-admin/admin.php?page=shareaholic-settings-plugin1,6238.58289.95105.16
In-Page Code Blocks /wp-admin/admin.php?page=shareaholic-settings-code-blocks1,7148.69223.7070.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/shareaholic/shareaholic.php
    • > /wp-content/plugins/shareaholic/templates/admin_form.php
    • > /wp-content/plugins/shareaholic/templates/verify_api_key_js.php
  • 33× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Undefined variable: api_key in wp-content/plugins/shareaholic/templates/admin.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/shareaholic/languages/shareaholic-translations.php:3
    • > PHP Notice
      Undefined variable: verification_key in wp-content/plugins/shareaholic/templates/verify_api_key_js.php on line 24
    • > PHP Fatal error
      Uncaught Error: Class 'ShareaholicUtilities' not found in wp-content/plugins/shareaholic/templates/script_chat.php:1
    • > PHP Warning
      Use of undefined constant SHAREAHOLIC_PATH - assumed 'SHAREAHOLIC_PATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/shareaholic/public.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/shareaholic/templates/terms_of_service_modal.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/shareaholic/sexy-bookmarks.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ShareaholicUtilities' not found in wp-content/plugins/shareaholic/templates/header.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/shareaholic/templates/footer.php:4
    • > PHP Fatal error
      require_once(): Failed opening required 'SHAREAHOLIC_PATHlib/plugin-deactivation-survey/deactivate-feedback-form.php' (include_path='.:/usr/share/php') in wp-content/plugins/shareaholic/admin.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shareaholic-settings-code-blocks
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Origin trial controlled feature not enabled: 'interest-cohort'.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=shareaholic-settings-code-blocks
    • > Other (warning) in unknown
    https://js.driftt.com/include/1701624900000/mezhk4858hn8.js 0 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Tags: You are using too many tags: 93 tag instead of maximum 10
The official readme.txt might help

shareaholic/shareaholic.php 92% from 13 tests

The primary PHP file in "Professional Social Sharing Buttons, Icons & Related Posts - Shareaholic" version 9.7.10 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 187 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Success! There were no dangerous files found in this plugin32,731 lines of code in 77 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript122,0241,94011,889
CSS112368710,249
PHP338661,5845,620
PO File212,0964,4584,973

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.51
Average class complexity57.79
▷ Minimum class complexity4.00
▷ Maximum class complexity264.00
Average method complexity4.85
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods208
▷ Static methods18689.42%
▷ Public methods16579.33%
▷ Protected methods00.00%
▷ Private methods4320.67%
Functions7
▷ Named functions685.71%
▷ Anonymous functions114.29%
Constants14
▷ Global constants428.57%
▷ Class constants1071.43%
▷ Public constants10100.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
13 PNG files occupy 0.11MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/happy-people-cover.png37.26KB36.25KB▼ 2.71%
assets/css/modal-gloss.png2.84KB2.69KB▼ 5.43%
assets/img/bolt.png2.60KB1.39KB▼ 46.46%
assets/img/icon-256x256.png2.88KB1.47KB▼ 48.90%
assets/img/shareaholic_com_sprite.png3.21KB2.16KB▼ 32.63%