77% mashsharer

Code Review | Social Media Share Buttons And Social Buttons | MashShare

WordPress plugin Social Media Share Buttons And Social Buttons | MashShare scored77%from 54 tests.

About plugin

  • Plugin page: mashsharer
  • Plugin version: 3.8.9
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Mar 4, 2014
  • Latest release: Oct 5, 2023
  • Number of updates: 562
  • Update frequency: every 6.2 days
  • Top authors: ReneHermi (98.04%)giucu91 (1.25%)

Code review

54 tests

User reviews

1025 reviews

Install metrics

20,000+ active /2,380,237 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲1.44MB] [CPU: ▲7.29ms] Passed 4 tests

An overview of server-side resources used by Social Media Share Buttons And Social Buttons | MashShare
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.48 ▲1.0245.25 ▲6.28
Dashboard /wp-admin4.89 ▲1.5955.64 ▲6.46
Posts /wp-admin/edit.php4.94 ▲1.5961.23 ▲14.74
Add New Post /wp-admin/post-new.php7.53 ▲1.64102.20 ▲1.67
Media Library /wp-admin/upload.php4.81 ▲1.5855.62 ▲20.34
Install Add-Ons /wp-admin/admin.php?page=mashsb-addons4.72293.42
Im/Export & System /wp-admin/admin.php?page=mashsb-tools4.72272.08
Quickstart /wp-admin/admin.php?page=mashsb-getting-started4.72280.86
Settings /wp-admin/admin.php?page=mashsb-settings4.80263.24
Welcome to MashShare /wp-admin/admin.php?page=mashsb-about4.72262.27

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 407 new files
Database: no new tables, 13 new options
New WordPress options
mashsb_update_notice_101
widget_theysaidso_widget
mashsb_networks
mashsb_settings
mashsb_RatingDiv
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts
widget_recent-comments
...

Browser metrics Passed 4 tests

An overview of browser requirements for Social Media Share Buttons And Social Buttons | MashShare
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,985 ▲21413.68 ▼0.707.30 ▲5.3439.29 ▼9.93
Dashboard /wp-admin2,280 ▲955.13 ▲0.25110.69 ▲8.6746.02 ▲4.97
Posts /wp-admin/edit.php2,192 ▲1032.01 ▼0.0140.69 ▲4.0636.09 ▲4.84
Add New Post /wp-admin/post-new.php6,488 ▲4,96926.32 ▲3.09943.21 ▲331.7980.83 ▲24.37
Media Library /wp-admin/upload.php1,474 ▲864.24 ▲0.07111.94 ▲16.5251.71 ▲7.34
Install Add-Ons /wp-admin/admin.php?page=mashsb-addons1,1123.0964.4031.01
Im/Export & System /wp-admin/admin.php?page=mashsb-tools1,0162.9958.9627.38
Quickstart /wp-admin/admin.php?page=mashsb-getting-started1,1192.9751.3360.16
Settings /wp-admin/admin.php?page=mashsb-settings2,6893.6275.1759.37
Welcome to MashShare /wp-admin/admin.php?page=mashsb-about1,1142.9857.6239.94

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 13 options in the database
    • mashsb_installDate
    • can_compress_scripts
    • db_upgraded
    • mashsb_networks
    • widget_recent-posts
    • mashsb_RatingDiv
    • widget_theysaidso_widget
    • mashsb_version
    • mashsb_update_notice_101
    • mashsb_settings
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Almost there! Just fix the following items
  • 4× PHP files output text when accessed directly:
    • > /wp-content/plugins/mashsharer/includes/admin/meta-box/inc/templates/image-advanced_1.php
    • > /wp-content/plugins/mashsharer/includes/admin/meta-box/inc/templates/media.php
    • > /wp-content/plugins/mashsharer/includes/admin/meta-box/inc/templates/upload.php
    • > /wp-content/plugins/mashsharer/includes/admin/meta-box/inc/templates/image-advanced.php
  • 64× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MASHSB_RWMB_Input_Field' not found in wp-content/plugins/mashsharer/includes/admin/meta-box/inc/fields/checkbox.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'iMashDebug' not found in wp-content/plugins/mashsharer/includes/debug/classes/MashDebug.class.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'MASHSB_RWMB_Field' not found in wp-content/plugins/mashsharer/includes/admin/meta-box/inc/fields/wysiwyg.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'MASHSB_RWMB_Text_Field' not found in wp-content/plugins/mashsharer/includes/admin/meta-box/inc/fields/password.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MASHSB_RWMB_Field' not found in wp-content/plugins/mashsharer/includes/admin/meta-box/inc/fields/divider.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MASHSB_RWMB_Field' not found in wp-content/plugins/mashsharer/includes/admin/meta-box/inc/fields/custom-html.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'MASHSB_RWMB_Walker' not found in wp-content/plugins/mashsharer/includes/admin/meta-box/inc/walkers/select-walker.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'MASHSB_RWMB_Multiple_Values_Field' not found in wp-content/plugins/mashsharer/includes/admin/meta-box/inc/fields/text-list.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MASHSB_RWMB_Text_Field' not found in wp-content/plugins/mashsharer/includes/admin/meta-box/inc/fields/color.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'MASHSB_RWMB_Input_Field' not found in wp-content/plugins/mashsharer/includes/admin/meta-box/inc/fields/text.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% 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 require attention:
  • Requires at least: Version format is invalid
The official readme.txt is a good inspiration

mashsharer/mashshare.php 85% from 13 tests

The principal PHP file in "Social Media Share Buttons And Social Buttons | MashShare" v. 3.8.9 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("mashsharer.php" instead of "mashshare.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected30,716 lines of code in 331 files:
LanguageFilesBlank linesComment linesLines of code
PHP1192,5446,09811,084
PO File113,0843,2689,583
JavaScript1567479956,052
CSS393513373,814
SVG263087
Markdown336066
XML111030

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity12.27
▷ Minimum class complexity1.00
▷ Maximum class complexity119.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes82
▷ Abstract classes78.54%
▷ Concrete classes7591.46%
▷ Final classes11.33%
Methods507
▷ Static methods24848.92%
▷ Public methods47293.10%
▷ Protected methods61.18%
▷ Private methods295.72%
Functions198
▷ Named functions19698.99%
▷ Anonymous functions21.01%
Constants28
▷ Global constants1346.43%
▷ Class constants1553.57%
▷ Public constants15100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
33 PNG files occupy 0.52MB with 0.14MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/screenshots/most-shared-posts.png22.65KB21.95KB▼ 3.09%
includes/admin/meta-box/img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
includes/admin/meta-box/img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
assets/images/screenshots/oauth.png8.47KB3.78KB▼ 55.38%
assets/images/screenshots/widget.png77.87KB22.23KB▼ 71.45%