68% ds-suit

Code Review | Battle Suit for Divi

WordPress plugin Battle Suit for Divi scored 68% from 54 tests.

About plugin

  • Plugin page: ds-suit
  • Plugin version: 1.17.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-5.8.0
  • WordPress version: 5.9.2
  • First release: May 7, 2018
  • Latest release: Aug 28, 2021
  • Number of updates: 54
  • Update frequency: every 22.5 days
  • Top authors: janthielemann (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

7,000+ active / 42,627 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲4.31MB] [CPU: ▼287.42ms] Passed 4 tests

Server-side resources used by Battle Suit for Divi
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /8.19 ▲4.6884.86 ▲32.76
Dashboard /wp-admin8.21 ▲4.8057.01 ▲22.24
Posts /wp-admin/edit.php8.21 ▲4.5761.04 ▲18.44
Add New Post /wp-admin/post-new.php10.17 ▲3.20117.20 ▼1,212.64
Media Library /wp-admin/upload.php8.21 ▲4.9246.29 ▲22.28
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius8.2145.69

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 259 new files
Database: no new tables, 4 new options
New WordPress options
fs_gdpr
fs_accounts
fs_debug_mode
fs_active_plugins

Browser metrics Passed 4 tests

This is an overview of browser requirements for Battle Suit for Divi
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,063 ▲30916.50 ▲0.8512.58 ▲6.262.41 ▼0.12
Dashboard /wp-admin3,051 ▲1976.18 ▼0.02133.01 ▼2.18192.48 ▲30.99
Posts /wp-admin/edit.php2,877 ▲1863.41 ▲0.1767.85 ▲5.11156.63 ▲9.80
Add New Post /wp-admin/post-new.php1,707 ▲4620.22 ▲3.55411.06 ▼7.91207.83 ▲48.50
Media Library /wp-admin/upload.php1,864 ▲1695.83 ▲0.33129.23 ▼14.29265.99 ▲76.66
Freemius Debug [v.2.3.2] /wp-admin/admin.php?page=freemius1,4992.7457.91114.12

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/ds-suit/freemius/includes/class-freemius.php+8218
    Undefined property: stdClass::$plugins
  • The uninstall procedure has failed, leaving 4 options in the database
    • fs_accounts
    • fs_debug_mode
    • fs_gdpr
    • fs_active_plugins

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 everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/ds-suit/freemius/templates/ajax-loader.php
  • 24× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: VARS in wp-content/plugins/ds-suit/freemius/templates/account/partials/addon.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/ds-suit/includes/modules/PostButton/PostButton.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function DiviSenseiSuit\\plugin_dir_path() in wp-content/plugins/ds-suit/includes/plugin.php:118
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/ds-suit/freemius/templates/account/partials/addon.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_slug() on null in wp-content/plugins/ds-suit/freemius/templates/account/partials/addon.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/ds-suit/includes/modules/VideoLightbox/VideoLightbox.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/ds-suit/includes/modules/Bucket/Bucket.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/ds-suit/includes/modules/PostMetaParent/PostMetaParent.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/ds-suit/includes/modules/PostFeaturedImage/PostFeaturedImage.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'ET_Builder_Module' not found in wp-content/plugins/ds-suit/includes/modules/LibraryLayout/LibraryLayout.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Please delete some tags, you are using 17 tag instead of maximum 10
  • Donate link: Invalid URI ("")
The official readme.txt is a good inspiration

ds-suit/ds-suit.php Passed 13 tests

Analyzing the main PHP file in "Battle Suit for Divi" version 1.17.0
51 characters long description:
A useful collection of Divi modules and extensions.

Code Analysis 97% from 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
Everything looks great! No dangerous files found in this plugin52,424 lines of code in 208 files:
LanguageFilesBlank linesComment linesLines of code
PHP1277,81116,13034,222
PO File137,0538,58915,462
JSX15327681,232
CSS321295794
JavaScript209493522
Markdown1610192

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
It is recommended to fix the following
  • Cyclomatic complexity of classes should be reduced to less than 1000 (currently 2,772)
Cyclomatic complexity
Average complexity per logical line of code0.59
Average class complexity65.22
▷ Minimum class complexity1.00
▷ Maximum class complexity2,772.00
Average method complexity4.38
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes64
▷ Abstract classes23.12%
▷ Concrete classes6296.88%
▷ Final classes00.00%
Methods1,246
▷ Static methods18314.69%
▷ Public methods89872.07%
▷ Protected methods151.20%
▷ Private methods33326.73%
Functions100
▷ Named functions9696.00%
▷ Anonymous functions44.00%
Constants123
▷ Global constants9879.67%
▷ Class constants2520.33%
▷ Public constants25100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/divi-sensei-100.png5.76KB3.10KB▼ 46.26%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/ds-suit-toolset.png21.01KB8.11KB▼ 61.39%
admin/assets/divi-sensei-64.png3.52KB2.26KB▼ 35.67%
freemius/assets/img/ds-suit-countdown.png21.01KB8.11KB▼ 61.39%