74% wp-to-hootsuite

Code Review | Post to Social Media - WordPress to Hootsuite

WordPress plugin Post to Social Media - WordPress to Hootsuite scored74%from 54 tests.

About plugin

  • Plugin page: wp-to-hootsuite
  • Plugin version: 1.5.4
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.4.1
  • WordPress version: 6.3.1
  • First release: Apr 5, 2018
  • Latest release: Nov 17, 2023
  • Number of updates: 97
  • Update frequency: every 21.2 days
  • Top authors: wpzinc (100%)

Code review

54 tests

User reviews

15 reviews

Install metrics

900+ active /57,364 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲1.09MB] [CPU: ▲1.50ms] Passed 4 tests

This is a short check of server-side resources used by Post to Social Media - WordPress to Hootsuite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.52 ▲1.0643.10 ▼3.56
Dashboard /wp-admin4.45 ▲1.1053.55 ▼6.40
Posts /wp-admin/edit.php4.50 ▲1.1557.21 ▲9.22
Add New Post /wp-admin/post-new.php6.99 ▲1.10102.89 ▲15.88
Media Library /wp-admin/upload.php4.31 ▲1.0843.02 ▲6.72
Settings /wp-admin/admin.php?page=wp-to-hootsuite-settings4.3140.98
Logs /wp-admin/admin.php?page=wp-to-hootsuite-log4.3540.22
Upgrade /wp-admin/admin.php?page=wp-to-hootsuite-upgrade2.318.16

Server storage [IO: ▲1.12MB] [DB: ▲0.01MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 399 new files
Database: 1 new table, 9 new options
New tables
wp_to_hootsuite_log
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget
wp-to-hootsuite-version
wp-to-hootsuite-pro-log
wp-to-hootsuite-pro-post

Browser metrics Passed 4 tests

An overview of browser requirements for Post to Social Media - WordPress to Hootsuite
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10414.37 ▼0.341.70 ▲0.0239.28 ▼6.00
Dashboard /wp-admin2,256 ▲795.57 ▲0.0193.22 ▼8.2579.76 ▲33.01
Posts /wp-admin/edit.php2,183 ▲832.00 ▼0.0239.89 ▲2.4035.09 ▲1.20
Add New Post /wp-admin/post-new.php1,812 ▲28619.75 ▼3.45717.04 ▼5.4656.67 ▲3.83
Media Library /wp-admin/upload.php1,476 ▲794.14 ▼0.04114.59 ▲16.8647.71 ▲4.78
Settings /wp-admin/admin.php?page=wp-to-hootsuite-settings1,0583.0644.2175.53
Logs /wp-admin/admin.php?page=wp-to-hootsuite-log1,5121.8227.1230.71
Upgrade /wp-admin/admin.php?page=wp-to-hootsuite-upgrade3,00912.55399.38167.29

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_to_hootsuite_log
  • The uninstall procedure has failed, leaving 9 options in the database
    • theysaidso_admin_options
    • wp-to-hootsuite-pro-log
    • widget_recent-comments
    • widget_recent-posts
    • wp-to-hootsuite-pro-post
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • wp-to-hootsuite-version

Smoke tests 75% 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 50% 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 fix the following items
  • 28× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-to-hootsuite/lib/views/settings-post-actionheader.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-to-hootsuite/lib/views/settings-auth.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-to-hootsuite/lib/views/settings-post.php:21
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-to-hootsuite/_modules/dashboard/views/footer-upgrade-embedded.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-to-hootsuite/_modules/dashboard/views/deactivation-modal.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'WP_To_Social_Pro_API' not found in wp-content/plugins/wp-to-hootsuite/lib/includes/class-wp-to-social-pro-twitter-api.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-to-hootsuite/lib/views/settings-post-action.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-to-hootsuite/_modules/dashboard/views/import-export.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-to-hootsuite/_modules/dashboard/views/sidebar-upgrade.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-to-hootsuite/lib/views/settings.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Tags: Please delete some tags, you are using 64 tag instead of maximum 10
The official readme.txt is a good inspiration

wp-to-hootsuite/wp-to-hootsuite.php Passed 13 tests

The main PHP script in "Post to Social Media - WordPress to Hootsuite" version 1.5.4 is automatically included on every request by WordPress
135 characters long description:
Send WordPress Pages, Posts or Custom Post Types to your Hootsuite (hootsuite.com) account for scheduled publishing to social networks.

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
Good job! No executable or dangerous file extensions detected15,955 lines of code in 397 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript421,6692,2476,688
PHP502,0415,0616,442
Sass523602,136
SVG29702686
CSS3003

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.42
Average class complexity38.00
▷ Minimum class complexity2.00
▷ Maximum class complexity150.00
Average method complexity3.91
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes22
▷ Abstract classes00.00%
▷ Concrete classes22100.00%
▷ Final classes00.00%
Methods280
▷ Static methods10.36%
▷ Public methods21476.43%
▷ Protected methods20.71%
▷ Private methods6422.86%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected