66% addons-for-divi

Code Review | DiviTorque - Divi Theme, Divi Builder and Extra Theme

WordPress plugin DiviTorque - Divi Theme, Divi Builder and Extra Theme scored 66% from 54 tests.

About plugin

  • Plugin page: addons-for-divi
  • Plugin version: 3.5.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-5.9
  • WordPress version: 5.9.2
  • First release: Oct 29, 2020
  • Latest release: Mar 11, 2022
  • Number of updates: 82
  • Update frequency: every 7.5 days
  • Top authors: divipeople (78.05%)divitorque (23.17%)

Code review

54 tests

User reviews

42 reviews

Install metrics

5,000+ active / 48,208 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲4.64MB] [CPU: ▼233.01ms] Passed 4 tests

Server-side resources used by DiviTorque - Divi Theme, Divi Builder and Extra Theme
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /8.41 ▲4.89146.30 ▲94.69
Dashboard /wp-admin8.43 ▲5.02116.55 ▲76.64
Posts /wp-admin/edit.php8.43 ▲4.79107.29 ▲67.11
Add New Post /wp-admin/post-new.php10.83 ▲3.86221.05 ▼1,153.89
Media Library /wp-admin/upload.php8.43 ▲5.13114.69 ▲78.11
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius8.4381.55
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php9.00121.54
All Popups /wp-admin/edit.php?post_type=brainaddons-popup8.4397.60

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 371 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
brainaddons_settings
fs_gdpr
fs_debug_mode
divi_torque_version
fs_active_plugins
widget_recent-comments
divitorque_version
divi_torque_activation_date
fs_accounts

Browser metrics Passed 4 tests

An overview of browser requirements for DiviTorque - Divi Theme, Divi Builder and Extra Theme
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,046 ▲29215.73 ▼0.0222.37 ▲15.985.05 ▲2.18
Dashboard /wp-admin2,986 ▲1286.21 ▲0.02214.63 ▲75.68470.96 ▲311.93
Posts /wp-admin/edit.php2,806 ▲1153.29 ▲0.04115.50 ▲51.05263.02 ▲46.41
Add New Post /wp-admin/post-new.php1,680 ▲4117.43 ▼2.711,003.10 ▲433.27263.32 ▲75.61
Media Library /wp-admin/upload.php1,805 ▲1105.62 ▲0.14288.56 ▲89.85364.26 ▲109.51
Freemius Debug [v.2.4.3] /wp-admin/admin.php?page=freemius1,5092.78100.83205.23
Customize /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php12,30323.591,270.19463.26
All Popups /wp-admin/edit.php?post_type=brainaddons-popup1,4943.1998.74209.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 10 options in the database
    • fs_accounts
    • divi_torque_version
    • divitorque_version
    • fs_gdpr
    • widget_recent-posts
    • widget_recent-comments
    • fs_debug_mode
    • brainaddons_settings
    • fs_active_plugins
    • divi_torque_activation_date

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Notice in wp-includes/class-wp-customize-nav-menus.php+1152
    Trying to get property 'title' of non-object

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
The following issues need your attention
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/addons-for-divi/includes/admin/view/admin-pro.php
  • 62× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/addons-for-divi/includes/admin/view/admin-main.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'BA_Builder_Module' not found in wp-content/plugins/addons-for-divi/includes/modules/TwitterFeed/TwitterFeed.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BrainAddons\\add_action() in wp-content/plugins/addons-for-divi/includes/customizer/customizer.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'BA_Builder_Module' not found in wp-content/plugins/addons-for-divi/includes/modules/AdvancedDivider/AdvancedDivider.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'BA_Builder_Module' not found in wp-content/plugins/addons-for-divi/includes/modules/Cf7Styler/Cf7Styler.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'BA_Builder_Module' not found in wp-content/plugins/addons-for-divi/includes/modules/AdvancedTeam/AdvancedTeam.php:2
    • > PHP Notice
      Undefined variable: show_date in wp-content/plugins/addons-for-divi/includes/modules/PostList/templates/list-content.php on line 59
    • > PHP Notice
      Undefined variable: wp_customize in wp-content/plugins/addons-for-divi/includes/customizer/options/blog-designer.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/addons-for-divi/includes/admin/view/admin-home.php:37
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/addons-for-divi/includes/extensions/popup-maker/popup-container.php on line 8

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=freemius
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: $(...).select2 is not a function" "TypeError: $(...).select2 is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/admin.php?page=freemius:57:35)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=brainaddons-popup
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31702 Uncaught TypeError: $(...).select2 is not a function
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,regenerator-runtime,wp-polyfill,wp-hooks,underscore,wp-dom-ready&ver=5.9.2 1:31592 "jQuery.Deferred exception: Cannot read properties of undefined (reading '_value')" "TypeError: Cannot read properties of undefined (reading '_value')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/addons-for-divi/includes/customizer/js/customizer.min.js:1:2296)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,regenerator-runtime,wp-polyfill,wp-hooks,underscore,wp-dom-ready&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,regenerator-runtime,wp-polyfill,wp-hooks,underscore,wp-dom-ready&ver=5.9.2:2:30340)" undefined
    • > GET request to /wp-admin/customize.php?return=%2Fwp-admin%2Fwp-api.php
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,regenerator-runtime,wp-polyfill,wp-hooks,underscore,wp-dom-ready&ver=5.9.2 1:31702 Uncaught TypeError: Cannot read properties of undefined (reading '_value')
    • > GET request to /wp-admin/edit.php?post_type=brainaddons-popup
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2 1:31592 "jQuery.Deferred exception: $(...).select2 is not a function" "TypeError: $(...).select2 is not a function\n at HTMLDocument.\u003Canonymous> (/wp-admin/edit.php?post_type=brainaddons-popup:57:35)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30038)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=5.9.2:2:30340)" undefined

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6 in addons-for-divi/assets to your readme.txt
The official readme.txt might help

addons-for-divi/addons-for-divi.php Passed 13 tests

The main PHP file in "DiviTorque - Divi Theme, Divi Builder and Extra Theme" ver. 3.5.0 adds more information about the plugin and also serves as the entry point for this plugin
78 characters long description:
DiviTorque is a plugin that turns Divi theme into a powerful Swiss army knife.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin79,111 lines of code in 293 files:
LanguageFilesBlank linesComment linesLines of code
PHP18811,30716,61964,942
JavaScript325892824,736
PO File11,86834,4873,931
CSS29464863,086
SVG402032,000
Markdown1680214
XML110175
JSON10027

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Class cyclomatic complexity should be reduced to less than 1000 (currently 2,910)
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity53.44
▷ Minimum class complexity1.00
▷ Maximum class complexity2,910.00
Average method complexity4.41
▷ Minimum method complexity1.00
▷ Maximum method complexity86.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes102
▷ Abstract classes32.94%
▷ Concrete classes9997.06%
▷ Final classes11.01%
Methods1,563
▷ Static methods23014.72%
▷ Public methods1,16074.22%
▷ Protected methods654.16%
▷ Private methods33821.63%
Functions144
▷ Named functions13291.67%
▷ Anonymous functions128.33%
Constants137
▷ Global constants11181.02%
▷ Class constants2618.98%
▷ Public constants26100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
4 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
freemius/assets/img/addons-for-divi-premium.png12.94KB7.43KB▼ 42.58%
freemius/assets/img/addons-for-divi.png11.70KB5.21KB▼ 55.45%
freemius/assets/img/theme-icon.png10.97KB5.78KB▼ 47.37%
freemius/assets/img/plugin-icon.png9.16KB5.26KB▼ 42.58%