78% social-pug

Code Review | Grow Social

WordPress plugin Grow Social scored78%from 54 tests.

About plugin

  • Plugin page: social-pug
  • Plugin version: 1.20.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.0
  • WordPress version: 6.3.1
  • First release: Jan 7, 2016
  • Latest release: Mar 8, 2023
  • Number of updates: 123
  • Update frequency: every 21.3 days
  • Top authors: iova.mihai (85.37%)mediavine (15.45%)

Code review

54 tests

User reviews

169 reviews

Install metrics

60,000+ active /1,488,319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲1.74MB] [CPU: ▲3.17ms] Passed 4 tests

An overview of server-side resources used by Grow Social
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.16 ▲1.7054.40 ▲10.81
Dashboard /wp-admin5.07 ▲1.7361.19 ▼6.27
Posts /wp-admin/edit.php5.16 ▲1.8060.99 ▲7.79
Add New Post /wp-admin/post-new.php7.63 ▲1.7598.01 ▲0.34
Media Library /wp-admin/upload.php4.99 ▲1.7755.26 ▲16.34
Extensions /wp-admin/admin.php?page=dpsp-extensions4.9746.50
Toolkit /wp-admin/admin.php?page=dpsp-toolkit4.9747.50
Settings /wp-admin/admin.php?page=dpsp-settings4.9752.71

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 296 new files
Database: no new tables, 14 new options
New WordPress options
can_compress_scripts
dpsp_first_activation
dpsp_product_serial_status
theysaidso_admin_options
dpsp_settings
dpsp_location_content
dpsp_location_sidebar
widget_dpsp_top_shared_posts
dpsp_version
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Grow Social: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,920 ▲17413.53 ▼0.872.06 ▲0.3230.71 ▼13.39
Dashboard /wp-admin2,322 ▲1345.37 ▼0.53110.14 ▼3.2449.92 ▲7.67
Posts /wp-admin/edit.php2,209 ▲1202.72 ▲0.7041.60 ▲3.5440.16 ▲2.86
Add New Post /wp-admin/post-new.php1,552 ▲3223.60 ▲0.57680.61 ▼7.0837.78 ▼13.30
Media Library /wp-admin/upload.php1,506 ▲1154.57 ▲0.29108.44 ▲3.8049.22 ▲3.74
Extensions /wp-admin/admin.php?page=dpsp-extensions1,1012.7840.1780.67
Toolkit /wp-admin/admin.php?page=dpsp-toolkit1,1152.7739.6546.89
Settings /wp-admin/admin.php?page=dpsp-settings1,2312.7346.0446.43

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 14 options in the database
    • db_upgraded
    • dpsp_version
    • dpsp_location_sidebar
    • widget_theysaidso_widget
    • dpsp_location_content
    • can_compress_scripts
    • widget_recent-posts
    • widget_dpsp_top_shared_posts
    • widget_recent-comments
    • dpsp_run_setup_info_nag
    • ...

Smoke tests 50% 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)
Good news, no errors were detected

SRP 0% 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
Please fix the following items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/social-pug/inc/feature-flags.php
    • > /wp-content/plugins/social-pug/index.php
  • 55× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Puc_v4p10_Factory' not found in wp-content/plugins/social-pug/vendor/kernl/kernl-update-checker/Puc/v4/Factory.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Social_Pug' not found in wp-content/plugins/social-pug/inc/class-settings.php:4
    • > PHP Warning
      Use of undefined constant DPSP_VERSION - assumed 'DPSP_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/social-pug/inc/admin/views/view-submenu-page-debugger.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'Mediavine\\Grow\\Settings' not found in wp-content/plugins/social-pug/inc/tools/share-floating-sidebar/views/view-submenu-page-sidebar.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Mediavine\\Grow\\Has_Settings_API' not found in wp-content/plugins/social-pug/inc/tools/class-tool.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Social_Pug' not found in wp-content/plugins/social-pug/inc/admin/views/view-submenu-page-toolkit.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugins() in wp-content/plugins/social-pug/inc/admin/views/view-submenu-page-debugger.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'Mediavine\\Grow\\Settings' not found in wp-content/plugins/social-pug/inc/tools/share-sticky-bar/views/view-submenu-page-sticky-bar.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WP_REST_Controller' not found in wp-content/plugins/social-pug/inc/class-status-api-controller.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Mediavine\\Grow\\Integrations\\Container' not found in wp-content/plugins/social-pug/inc/integrations/class-integration.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
9 plugin tags: social share icon, social share buttons, social sharing, social share counts, social sharing icon...

social-pug/index.php 85% from 13 tests

The main file in "Grow Social" v. 1.20.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("social-pug.php" instead of "index.php")
  • Requires at least: Required version must match the one declared in readme.txt ("4.7" instead of "5.2")

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
There were no executable files found in this plugin19,775 lines of code in 188 files:
LanguageFilesBlank linesComment linesLines of code
PHP1443,9846,41715,370
Sass2146943,887
JavaScript107478223
JSON380107
CSS73611105
SVG131043
HTML11033
Markdown1307

PHP code Passed 2 tests

A brief analysis 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.41
Average class complexity20.13
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity3.07
▷ Minimum method complexity1.00
▷ Maximum method complexity32.00
Code structure
Namespaces9
Interfaces2
Traits1
Classes80
▷ Abstract classes78.75%
▷ Concrete classes7391.25%
▷ Final classes00.00%
Methods794
▷ Static methods15319.27%
▷ Public methods57472.29%
▷ Protected methods16520.78%
▷ Private methods556.93%
Functions194
▷ Named functions16886.60%
▷ Anonymous functions2613.40%
Constants35
▷ Global constants720.00%
▷ Class constants2880.00%
▷ Public constants2071.43%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
39 PNG files occupy 0.69MB with 0.35MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/dist/social-pug-upgrade.1.20.3.png52.42KB26.15KB▼ 50.12%
assets/dist/extension-ctt.1.20.3.png72.65KB35.66KB▼ 50.92%
assets/dist/tool-content.1.20.3.png17.39KB9.61KB▼ 44.72%
assets/dist/tool-pop-up.1.20.3.png17.49KB9.81KB▼ 43.93%
assets/src/img/custom-social-media-image.png4.84KB1.64KB▼ 66.03%