10% twine-social

Code Review | Show your social media posts: easy & beautiful!

WordPress plugin Show your social media posts: easy & beautiful! scored 10% from 54 tests.

About plugin

  • Plugin page: twine-social
  • Plugin version: 3.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.4.2
  • WordPress version: 5.8.1
  • First release: Oct 24, 2013
  • Latest release: Jun 17, 2020
  • Number of updates: 126
  • Update frequency: every 19.3 days
  • Top authors: aaronfessler (99.21%)cjisemann (1.59%)

Code review

54 tests

User reviews

21 reviews

Install metrics

1,000+ active / 72,919 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/twine-social/twinesocial-widget.php+34
    Function create_function() is deprecated

Server metrics [RAM: ▼1.74MB] [CPU: ▼184.40ms] Passed 4 tests

Analyzing server-side resources used by Show your social media posts: easy & beautiful!
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /1.89 ▼0.8311.94 ▼11.47
Dashboard /wp-admin1.91 ▼1.146.02 ▼35.18
Posts /wp-admin/edit.php1.91 ▼1.206.37 ▼35.43
Add New Post /wp-admin/post-new.php1.91 ▼3.526.02 ▼645.29
Media Library /wp-admin/upload.php1.91 ▼1.096.31 ▼21.68

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 55 new files
Database: no new tables, 1 new option
New WordPress options
widget_twinesocial_widget

Browser metrics Passed 4 tests

Show your social media posts: easy & beautiful!: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,706 ▲11016.27 ▲0.7612.63 ▲3.0154.29 ▲3.94
Dashboard /wp-admin2,963 ▲265.94 ▲0.01157.73 ▲13.26151.07 ▲36.49
Posts /wp-admin/edit.php2,757 ▲182.68 ▼0.0170.68 ▲0.5084.68 ▼10.35
Add New Post /wp-admin/post-new.php1,686 ▲18618.40 ▼0.37397.81 ▼5.30123.16 ▲9.52
Media Library /wp-admin/upload.php1,748 ▼655.00 ▼0.01139.49 ▼8.06152.81 ▲30.38

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/twine-social/twinesocial-widget.php+34
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 1 option
    • widget_twinesocial_widget

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)
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 10× PHP files output text when accessed directly:
    • > /wp-content/plugins/twine-social/lib/tab-rules.php
    • > /wp-content/plugins/twine-social/lib/tab-hubs.php
    • > /wp-content/plugins/twine-social/lib/upgrade-banner.php
    • > /wp-content/plugins/twine-social/lib/tab-faq.php
    • > /wp-content/plugins/twine-social/lib/tab-shortcode.php
    • > /wp-content/plugins/twine-social/lib/tab-connections.php
    • > /wp-content/plugins/twine-social/lib/tab-users.php
    • > /wp-content/plugins/twine-social/lib/tab-feeds.php
    • > /wp-content/plugins/twine-social/lib/tab-settings.php
    • > /wp-content/plugins/twine-social/lib/tab-collections.php
  • 94× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to get property 'baseUrl' of non-object in wp-content/plugins/twine-social/lib/tab-shortcode.php on line 164
    • > PHP Warning
      Use of undefined constant TWINE_PUBLIC_URL - assumed 'TWINE_PUBLIC_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/twine-social/lib/tab-overview.php on line 6
    • > PHP Notice
      Undefined variable: twinesocial_accountid in wp-content/plugins/twine-social/lib/tab-settings.php on line 10
    • > PHP Notice
      Trying to get property 'campaigns' of non-object in wp-content/plugins/twine-social/lib/tab-hubs.php on line 22
    • > PHP Warning
      Use of undefined constant TWINE_CUSTOMER_URL - assumed 'TWINE_CUSTOMER_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/twine-social/lib/tab-users.php on line 22
    • > PHP Notice
      Undefined variable: twinesocial_appdata in wp-content/plugins/twine-social/lib/start.php on line 20
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/twine-social/lib/tab-shortcode.php on line 164
    • > PHP Notice
      Trying to get property 'campaigns' of non-object in wp-content/plugins/twine-social/lib/tab-collections.php on line 31
    • > PHP Notice
      Undefined variable: twinesocial_appdata in wp-content/plugins/twine-social/lib/upgrade-banner.php on line 15
    • > PHP Warning
      Use of undefined constant WPINC - assumed 'WPINC' (this will throw an Error in a future version of PHP) in wp-content/plugins/twine-social/twinesocial-admin.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add descriptions for these screenshots #6, #7 in twine-social/assets to your readme.txt
  • Tags: There are too many tags (33 tag instead of maximum 10)
You can look at the official readme.txt

twine-social/twinesocial-widget.php 85% from 13 tests

"Show your social media posts: easy & beautiful!" version 3.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("twine-social.php" instead of "twinesocial-widget.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 250 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin12,914 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
CSS79925710,868
PHP18262881,220
SVG100504
JavaScript45867322

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity6.86
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants12100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
10 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/help.png1.72KB2.26KB0.00%
(invalid) assets/banner-772x250.png12.27KB0.00KB▼ 100.00%
images/66.png1.25KB0.22KB▼ 82.10%
images/4444.png1.59KB0.47KB▼ 70.43%
images/dialog-critical.png3.33KB1.71KB▼ 48.83%