67% themify-builder

Code Review | Themify Builder

WordPress plugin Themify Builder scored67%from 54 tests.

About plugin

  • Plugin page: themify-builder
  • Plugin version: 7.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Dec 11, 2018
  • Latest release: Nov 4, 2023
  • Number of updates: 881
  • Update frequency: every 2.0 days
  • Top authors: themifyme (100%)

Code review

54 tests

User reviews

21 reviews

Install metrics

8,000+ active /423,107 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲9.09MB] [CPU: ▲47.94ms] 50% from 4 tests

Server-side resources used by Themify Builder
The following require your attention
  • RAM: The total memory usage must be kept under 10MB (currently 12.62MB on /wp-admin/edit.php?post_type=tb_cf)
  • Extra RAM: The extra memory usage must be under 5MB (currently 9.09MB on /wp-admin/edit.php?post_type=tb_cf)
PageMemory (MB)CPU Time (ms)
Home /11.78 ▲8.3279.03 ▲37.23
Dashboard /wp-admin12.65 ▲9.3092.30 ▲31.55
Posts /wp-admin/edit.php12.76 ▲9.41107.99 ▲61.70
Add New Post /wp-admin/post-new.php18.69 ▲12.80201.90 ▲100.51
Media Library /wp-admin/upload.php12.57 ▲9.3494.74 ▲61.29
Saved Layouts /wp-admin/edit.php?post_type=tbuilder_layout12.6485.21
Layout Parts /wp-admin/edit.php?post_type=tbuilder_layout_part12.6486.07
System Status /wp-admin/admin.php?page=tf-status12.5584.57
Global Styles /wp-admin/admin.php?page=themify-global-styles12.5676.80
Settings /wp-admin/admin.php?page=themify-builder15.9988.53
Custom Fonts /wp-admin/edit.php?post_type=tb_cf12.6291.07

Server storage [IO: ▲11.82MB] [DB: ▲0.04MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 1,821 new files
Database: 1 new table, 7 new options
New tables
wp_tf_storage
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_themify-layout-parts
widget_recent-comments
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Themify Builder
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,088 ▲34113.39 ▼0.9310.32 ▲8.5736.37 ▼7.73
Dashboard /wp-admin2,310 ▲1325.69 ▼0.0396.58 ▼18.1644.97 ▼1.67
Posts /wp-admin/edit.php2,198 ▲952.04 ▲0.0840.60 ▲4.6735.11 ▲0.06
Add New Post /wp-admin/post-new.php12,279 ▲10,74031.01 ▲7.651,296.47 ▲640.2054.78 ▲5.16
Media Library /wp-admin/upload.php1,488 ▲884.22 ▼0.02147.48 ▲46.5261.21 ▲14.56
Saved Layouts /wp-admin/edit.php?post_type=tbuilder_layout1,4443.5668.1937.62
Add Builder Page /wp-admin/edit.php?post_type=page&page=#tb_builder_page280.410.123.61
Layout Parts /wp-admin/edit.php?post_type=tbuilder_layout_part1,4393.8964.2332.25
System Status /wp-admin/admin.php?page=tf-status1,1921.6928.9430.43
Global Styles /wp-admin/admin.php?page=themify-global-styles1,1673.0746.5228.77
Settings /wp-admin/admin.php?page=themify-builder2,7702.0927.0349.44
Custom Fonts /wp-admin/edit.php?post_type=tb_cf1,1182.5355.6930.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_tf_storage
  • Zombie WordPress options were found after uninstall: 7 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_themify-layout-parts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 21× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant THEMIFY_URI - assumed 'THEMIFY_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/themify-builder/plugin/tpl/tmpl-builder-plugin-settings-page.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function site_url() in wp-content/plugins/themify-builder/themify/class-themify-custom-fonts.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themify-builder/theme-options.php:148
    • > PHP Fatal error
      Uncaught Error: Class 'Themify_Builder' not found in wp-content/plugins/themify-builder/includes/tpl/tmpl-common.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themify-builder/themify/class-themify-maintenance-mode.php:138
    • > PHP Warning
      Use of undefined constant THEMIFY_BUILDER_DIR - assumed 'THEMIFY_BUILDER_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/themify-builder/includes/tpl/tmpl-locked.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/themify-builder/themify/class-tf-term-image.php:9
    • > PHP Warning
      file_get_contents(THEMIFY_BUILDER_DIR/css/editor/modules/locked.css): failed to open stream: No such file or directory in wp-content/plugins/themify-builder/includes/tpl/tmpl-locked.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/themify-builder/templates/page-template-blank.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/themify-builder/themify/includes/conditions.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=page&page=#tb_builder_page
    • > Network (severe)
    wp-admin/edit.php?post_type=page&page=#tb_builder_page - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 86% 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
Please fix the following attributes:
  • Tags: You are using too many tags: 19 tag instead of maximum 10
The official readme.txt might help

themify-builder/themify-builder.php 77% from 13 tests

Analyzing the main PHP file in "Themify Builder" version 7.0.5
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 180 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin156,748 lines of code in 992 files:
LanguageFilesBlank linesComment linesLines of code
PHP2094,7058,14175,531
JavaScript2391,9711,33352,150
CSS48319553028,345
XML140662
SVG570057
JSON3003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.58
Average class complexity37.59
▷ Minimum class complexity1.00
▷ Maximum class complexity547.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity89.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes128
▷ Abstract classes10.78%
▷ Concrete classes12799.22%
▷ Final classes97.09%
Methods1,381
▷ Static methods71751.92%
▷ Public methods1,16684.43%
▷ Protected methods1037.46%
▷ Private methods1128.11%
Functions430
▷ Named functions42899.53%
▷ Anonymous functions20.47%
Constants57
▷ Global constants2543.86%
▷ Class constants3256.14%
▷ Public constants32100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
33 compressed PNG files occupy 0.07MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/row-frame/none.png0.50KB0.57KB0.00%
themify/img/select.png0.32KB0.36KB0.00%
themify/img/sidebars/2col.png0.09KB0.10KB0.00%
themify/img/arrow-down.png0.11KB0.14KB0.00%
themify/themify-metabox/img/ddbtn-check.png0.14KB0.23KB0.00%