<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: StaxWP</title>
    <description>The latest articles on DEV Community by StaxWP (@staxwp).</description>
    <link>https://dev.to/staxwp</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F5323%2F7536d902-f51d-4c71-8f35-d42571bc6cec.png</url>
      <title>DEV Community: StaxWP</title>
      <link>https://dev.to/staxwp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/staxwp"/>
    <language>en</language>
    <item>
      <title>Why you should NEVER use Nulled Wordpress plugins and themes and why is this still a trend</title>
      <dc:creator>George Tudor</dc:creator>
      <pubDate>Sat, 29 Oct 2022 18:27:52 +0000</pubDate>
      <link>https://dev.to/staxwp/why-you-should-never-use-nulled-wordpress-plugins-and-themes-and-why-is-this-still-a-trend-5h7f</link>
      <guid>https://dev.to/staxwp/why-you-should-never-use-nulled-wordpress-plugins-and-themes-and-why-is-this-still-a-trend-5h7f</guid>
      <description>&lt;p&gt;Let's be honest, piracy has always been a trend on the internet. Software, games, movies and music have always been distributed for free via CDs, DVDs, USB Sticks and lately torrent sites.&lt;/p&gt;

&lt;p&gt;While this sounds awesome for the end consumer, businesses suffer because of this. We all got some unauthorized copies of different things back in the days... and it felt great, not gonna lie. But it all comes with a risk and that risk is called &lt;strong&gt;malware&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We, at Stax, develop &lt;a href="https://staxwp.com/"&gt;Wordpress plugins&lt;/a&gt; &amp;amp; themes. Most of our plugins and themes are released as a freemium package, meaning there's a Free version and a Pro version. That's the main trend in the Wordpress community and we'd like to stick with that.&lt;/p&gt;

&lt;p&gt;All of our Free plugins are really generous in terms of options and functionality. We try to offer as much free functionality as possible to help regular users with their daily needs. The Pro versions of some of our plugins contain a lot more functionality which helps users achieve even more.&lt;/p&gt;

&lt;p&gt;Converting Free users into Pro users is sometimes hard, but not impossible. However, some users prefer to get the Pro version of different plugins from doggy sites that offer them for free or a lot cheaper than the main developer's price.&lt;/p&gt;

&lt;p&gt;Why is this happening? Well, there are lots of reasons, but here's what my findings are:&lt;/p&gt;

&lt;h2&gt;
  
  
  Pricing
&lt;/h2&gt;

&lt;p&gt;Some plugin developers tend to price their Pro version using multiple subscription tiers. The most common practices are a yearly subscription and a lifetime offer.&lt;/p&gt;

&lt;p&gt;Unfortunately even a yearly subscription seems to be too much for an end user, specially if they need the plugin just for a short period of time or they are not sure if their business will succeed... so a big investment is not justified by these circumstances.&lt;/p&gt;

&lt;p&gt;The price itself is also an issue for some potential customers. Really popular plugins or themes creators tend to price their products higher than their competitors just because their popular. This doesn't really mean their products are better than their competitors, but they have enough exposure to leverage this opportunity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trust issues
&lt;/h2&gt;

&lt;p&gt;I think the more you know about the Wordpress ecosystem, the easier it will be to know what you want. However, uncertainties can occur on both sides.&lt;br&gt;&lt;br&gt;
Trust issues usually rise for 4 reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The user don't really know if the tool they're going to purchase will get the job done.&lt;/li&gt;
&lt;li&gt;The product doesn't have a Free version the user can try before purchasing.&lt;/li&gt;
&lt;li&gt;The product doesn't have reviews.&lt;/li&gt;
&lt;li&gt;The product's author has a bad reputation or no reputation at all.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Now let's talk about the elephant in the room&lt;/strong&gt;, those so called "nulled" sites, which are distributing Pro versions of plugins and themes for free.&lt;/p&gt;

&lt;p&gt;There's a general rule in life: "Nothing is free". If you think these Pro plugins are free, then you're wrong and naive. There's always a price your have to pay, but in this case isn't money, it's your security and privacy.&lt;/p&gt;

&lt;p&gt;Here are the top 2 problems with Nulled plugins and themes and why you should NEVER trust them:&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Malware
&lt;/h2&gt;

&lt;p&gt;The most important issue is that 99% of the time they contain malicious code. &lt;/p&gt;

&lt;p&gt;It's usually a shell script that compromises your entire server and offers it on a silver plate to the software distributor.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. What you get is not actually what you want
&lt;/h2&gt;

&lt;p&gt;Most of the times, the nulled software distributor claims to provide the latest version of the plugin or theme you are looking for. Well, in most of the cases all you will get is an old Pro version which probably is no longer compatible with the current Free version.&lt;br&gt;
But... it can get worse. You might get just a malware and that's it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Are nulled plugins and themes distributors a bad thing for the &lt;br&gt;
Wordpress community? Definitely YES! Unfortunately, there's nothing we can do about it, except to raise awareness and show users what should they expect when they go on this road.&lt;/p&gt;

&lt;p&gt;As long as end users will search for nulled software, these sites won't go away. If 10 are terminated today, 20 will appear out of thin air tomorrow.&lt;/p&gt;

&lt;p&gt;So be responsible, do your homework and think twice before falling into this trap. &lt;/p&gt;

</description>
      <category>wordpress</category>
      <category>nulled</category>
      <category>security</category>
    </item>
    <item>
      <title>How to setup Wordpress coding standard rules in VS Code</title>
      <dc:creator>George Tudor</dc:creator>
      <pubDate>Fri, 18 Feb 2022 08:41:12 +0000</pubDate>
      <link>https://dev.to/staxwp/how-to-setup-wordpress-coding-standard-rules-in-vs-code-1dhi</link>
      <guid>https://dev.to/staxwp/how-to-setup-wordpress-coding-standard-rules-in-vs-code-1dhi</guid>
      <description>&lt;p&gt;I see a lot of code that's not following any standards. Especially in the Wordpress community.&lt;/p&gt;

&lt;p&gt;I don't hate it because it does the job done, but if you try to debug it or understand it you're gonna have a bad time. Unreadable code is awful.&lt;/p&gt;

&lt;p&gt;We, at &lt;a href="https://staxwp.com/" rel="noopener noreferrer"&gt;StaxWP&lt;/a&gt;, always use Wordpress coding standards in our themes and plugins. It's easy to implement it, let me show you.&lt;/p&gt;

&lt;h2&gt;
  
  
  What coding standard does Wordpress follow?
&lt;/h2&gt;

&lt;p&gt;Wordpress follows Pear coding standards but with some twists. There are some characteristics that are present only in Wordpress.&lt;/p&gt;

&lt;p&gt;Here are some examples:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

// Spatiate
$x = $foo[ $bar ]; // correct
$x = $foo[$bar]; // incorrect

// Yoda conditions
$x = 2 === $i; // correct
$x = $i === 2; // incorrect


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  So what do we do to fix these things automatically?
&lt;/h2&gt;

&lt;p&gt;We use &lt;a href="https://github.com/WordPress/WordPress-Coding-Standards" rel="noopener noreferrer"&gt;WordPress Coding Standards for PHP_CodeSniffer (WPCS)&lt;/a&gt; which uses Squizlabs' PHP codesniffer (phpcs) and beautifier &amp;amp; fixer (phpcbf) under the hood to scan and format the code.&lt;/p&gt;

&lt;p&gt;You can install WPCS globally or inside a project. I like to use it globally inside Ubuntu WSL2, but this guide will work for any setup. First we need to clone the repository in some location. I've picked the &lt;code&gt;home&lt;/code&gt; directory:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

git clone git@github.com:WordPress/WordPress-Coding-Standards.git


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Install the dependencies:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

cd WordPress-Coding-Standards
composer install


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Now we have &lt;code&gt;phpcs&lt;/code&gt; and &lt;code&gt;phpcbf&lt;/code&gt; installed in &lt;code&gt;vendor/squizlabs/php_codesniffer/bin&lt;/code&gt; and we can use them in VS Code.&lt;/p&gt;

&lt;p&gt;For VS Code we're using the &lt;a href="https://marketplace.visualstudio.com/items?itemName=ValeryanM.vscode-phpsab" rel="noopener noreferrer"&gt;PHP Sniffer &amp;amp; Beautifier&lt;/a&gt; extension. We just need to install it, add the paths to &lt;code&gt;phpcs&lt;/code&gt; and &lt;code&gt;phpcbf&lt;/code&gt; and tell it what coding standards to use.&lt;/p&gt;

&lt;p&gt;After we've installed it, we go ahead and press &lt;code&gt;Ctrl/Cmd + Shift + P&lt;/code&gt; inside VS Code and search for &lt;code&gt;settings.json&lt;/code&gt;. There will be 4 different files with the same name:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Workspace Settings: referring to the current project's settings&lt;/li&gt;
&lt;li&gt;Remote Settings: referring to the user's settings but inside WSL/Docker&lt;/li&gt;
&lt;li&gt;Settings: referring to the user's settings on current machine&lt;/li&gt;
&lt;li&gt;Default Settings: containing the default settings (we don't want to touch these)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Depending on your setup you will want to set these coding standards per user or per workspace. I suggest you set them per user and overwrite them per workspace whenever you have to.&lt;/p&gt;

&lt;p&gt;So were going to open the user's settings and add the following lines:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;"files.autoSave": "onWindowChange",&lt;br&gt;
"editor.linkedEditing": true,&lt;br&gt;
"editor.tabSize": 4,&lt;br&gt;
"editor.detectIndentation": false,&lt;br&gt;
"editor.formatOnSave": true,&lt;br&gt;
"window.title": "${activeEditorLong}${separator}${rootName}",&lt;br&gt;
"phpsab.standard": "WordPress",&lt;br&gt;
"phpsab.snifferEnable": true, // disable this if you don't need suggestions&lt;br&gt;
"phpsab.executablePathCBF": "{PATH}/WordPress-Coding-Standards/vendor/squizlabs/php_codesniffer/bin/phpcbf",&lt;br&gt;
"phpsab.executablePathCS": "{PATH}/WordPress-Coding-Standards/vendor/squizlabs/php_codesniffer/bin/phpcs",&lt;br&gt;
"phpsab.snifferShowSources": true&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Make sure to replace &lt;code&gt;{PATH}&lt;/code&gt; with the correct path to your &lt;code&gt;WordPress-Coding-Standards&lt;/code&gt; folder. Also, if you are on Windows and you don't use WSL2, you will need to refer to &lt;code&gt;phpcbf.bat&lt;/code&gt; and &lt;code&gt;phpcs.bat&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now we are pretty much set. Everytime we need some other coding standard we can overwrite it in our current workspace by adding &lt;code&gt;phpsab.standard&lt;/code&gt; and specifying the standard.&lt;/p&gt;

&lt;p&gt;Here's a short example of what will happen everytime you will have some badly formatted:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbo6p5hiv6cppe3lqvlvh.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbo6p5hiv6cppe3lqvlvh.gif" alt="formatting demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's it! Enjoy.&lt;/p&gt;

&lt;h4&gt;
  
  
  Support &amp;amp; follow me
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;a href="https://www.buymeacoffee.com/geowrgetudor" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fbadge%2FBuy_Me_A_Coffee-FFDD00%3Fstyle%3Dfor-the-badge%26logo%3Dbuy-me-a-coffee%26logoColor%3Dblack" alt="Buy me a coffee"&gt;&lt;/a&gt;&lt;/th&gt;
&lt;th&gt;&lt;a href="https://twitter.com/geowrgetudor" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fbadge%2FTwitter-1DA1F2%3Fstyle%3Dfor-the-badge%26logo%3Dtwitter%26logoColor%3Dwhite" alt="Twitter"&gt;&lt;/a&gt;&lt;/th&gt;
&lt;th&gt;&lt;a href="https://github.com/geowrgetudor" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fbadge%2FGitHub-100000%3Fstyle%3Dfor-the-badge%26logo%3Dgithub%26logoColor%3Dwhite" alt="GitHub"&gt;&lt;/a&gt;&lt;/th&gt;
&lt;th&gt;&lt;a href="https://linkedin.com/in/geowrgetudor" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimg.shields.io%2Fbadge%2FLinkedIn-0077B5%3Fstyle%3Dfor-the-badge%26logo%3Dlinkedin%26logoColor%3Dwhite" alt="Linkedin"&gt;&lt;/a&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
      <category>wordpress</category>
      <category>coding</category>
      <category>vscode</category>
      <category>wsl2</category>
    </item>
  </channel>
</rss>
