This is a guest post delivered on our request by Carolina Nymark. She is a representative of the WordPress.org Theme Review Team. In 2019 she helped build the default theme, Twenty Twenty. She is currently one of a handful reviewers who also reviews accessible WordPress themes. She has reviewed over 2,000 themes for the WordPress theme directory.Themes By Carolina
Ever wanted to know how does the code behind Divi compare to themes in the official theme directory?
Without a doubt, Divi’s strength lies in the Divi builder plugin, beautiful templates, and strong community. Without the templates, you start with a fairly basic theme. In this article we will look into the code behind Divi. We will present the results from a code review, where we have compared the code against the requirements for the official theme directory.
Cross-Site Content Copy Paste System for Divi, Gutenberg and Woo
The official theme directory hosts 7,399 free themes (as of this writing) and new themes are added every day.
All themes that are added to the theme directory goes through a manual code review. Because the code is reviewed entirely by volunteers, this process can take up to 4 months.
The volunteers check that the theme is secure. They check for PHP errors, that functions and scripts are used correctly, and that license information is included.
The theme directory is also very strict about functionality vs. presentation. It follows the motto that themes are for presenting content, not for creating content.
Functionality that is not related to design is not allowed. Instead, it needs to be placed in a plugin. The reason is that if the functionality is in the theme, the website may break if the theme is changed. WordPress wants it to be easy for users to switch themes without breaking anything.
There are over hundred requirements that a theme has to follow to be included in the directory. If you want to know more, you can read this list of requirements and also explore how ‘Theme Check Plugin‘ helps new theme submitters and reviewers.
The directory hosts several popular themes like Hello Elementor, Astra, GeneratePress and OceanWP that have passed this rigorous testing. These themes are used on between 100,000 – 600,000 websites.
Hello Elementor is built specifically for the Elementor page builder. Astra and OceanWP supports Elementor and other page builders, but relies on importable templates.
Does Divi pass the requirements of the official theme directory?
If there was a free version of Divi, could it be added to the theme directory? Let’s find out.
Licensing – Yes
Licensing is a very important aspect of WordPress. WordPress uses a license called General Public Licence, version 2. This is what allows everyone; you, me, and Elegant Themes to make changes to WordPress and share it with our friends or sell it.
Divi is released under the same license, GPL v2. The theme also has a list of all third party assets that are included, so this is a clear pass.
Options and Settings – No
Like we mentioned earlier, the theme directory is strict about functionality that is included in the theme.
Even if we ignore the Divi page builder, the following would not be allowed:
- Role editor.
- Divi Library.
- Theme options page in the admin area.
Themes included in the theme directory can not have a separate options page. All options need to be in the editor (meta boxes), as widgets, or in the customizer.
Divi also has options to include code in the header and other areas of the website. The theme directory does not allow this because it is not considered secure.
Be very careful if you use this option and do not add code if you are not sure it is secure. Adding insecure code can make your website vulnerable to attacks.
Security – Yes
We found that Divi itself is secure and it follows the same guidelines as the theme directory.
One of Divi’s strengths is that the community can discover and report security problems. This helps Elegant Themes solve problems and make new updates available. Always use the latest version of Divi.
Divi allows connections to third party services. It also allows users to add their own code. In these cases there is a higher risk, but the theme does what it needs to try to keep you safe.
Scripts and styles – No
A theme should include the scripts it uses. This is in case someone needs to use the theme on a closed network or a specialized intranet. If a theme uses CDN, a Content Delivery Network, there are cases where these links can be blocked by different countries. That would make the script unavailable and the website might break.
The Divi builder uses several remote scripts. For this article, we did not test whether this would cause any of the problems listed above.
Minified and unminified files – No
A theme can minify (compress) files to make a website load faster. If files are minified, the original version, – which can be read by a human, needs to be included.
By including both types of files, it makes it easier for users and developers to understand the code and make changes if needed.
In Divi, both versions are included for some files, but not for all.
Can the theme be translated – No
Divi is already translated into several languages. This is great feature, and the reason why the headline says no, is that the theme would need to be fully translatable.
This means that all text strings must be translatable. During the review several passages were found where the text could not be translated.
There were also missing translations for error messages which would make it more difficult to troubleshoot problems.
The answer to the question is that no, Divi does not follow the requirements needed to be include in the official WordPress theme directory.
But this does not mean that Divi is a bad theme, or that the requirements are too strict. The free themes on the WordPress.org and Divi caters to different markets.
There are many talented and professional website creators that choose Divi because of the flexibility. Divi is also often the preferred choice for people who like to set up their own website.
If someone is used to creating different layouts with Divi, it is easy to see how it can be difficult to change themes. Or to switch to using the WordPress block editor or Elementor.
When switching from Divi to a different theme, the code that Divi uses to create sections and modules are unfortunately left in the content.
The code is visible both on the front of a website, and in the editor. This makes it very difficult and time consuming to update old posts and pages. This is one of the reasons to why many users continue to use Divi once they have started.
But there are other types of users who enjoys seeing and testing new themes and trying out different settings. And for these users it is important that themes don’t break websites when they are deactivated.
That a user can download a free theme, change to a different theme, and use the same content, is one of the greatest strengths of WordPress itself.
And even when WordPress moves towards using the block editor more and more, there will be room for all types of themes.
NEXT: Learn How to Make Your Divi Website More Accessible >
We’d love to have a discussion with you regarding this topic! If you have anything more to add to this article, Simply leave them as comments below…