78% kingcomposer

Code Review | Page Builder: KingComposer - Free Drag and Drop page builder by King-Theme

WordPress plugin Page Builder: KingComposer - Free Drag and Drop page builder by King-Theme scored 78% from 54 tests.

About plugin

  • Plugin page: kingcomposer
  • Plugin version: 2.9.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 5.8.1
  • First release: Apr 2, 2016
  • Latest release: Jan 7, 2021
  • Number of updates: 346
  • Update frequency: every 5.0 days
  • Top authors: kingthemes (100%)

Code review

54 tests

User reviews

76 reviews

Install metrics

90,000+ active / 1,160,449 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲3.19MB] [CPU: ▼116.86ms] 75% from 4 tests

This is a short check of server-side resources used by Page Builder: KingComposer - Free Drag and Drop page builder by King-Theme
The following require your attention
  • CPU: Total CPU usage must kept under 500.00ms (currently 2,264.87ms on /wp-admin/admin.php?page=kc-extensions)
PageMemory (MB)CPU Time (ms)
Home /6.26 ▲3.4261.70 ▲25.06
Dashboard /wp-admin6.37 ▲3.3167.41 ▲16.95
Posts /wp-admin/edit.php6.37 ▲3.2671.74 ▲26.03
Add New Post /wp-admin/post-new.php8.26 ▲2.82123.16 ▼531.52
Media Library /wp-admin/upload.php6.37 ▲3.3751.16 ▲22.08
Shortcode Mapper /wp-admin/admin.php?page=kc-mapper6.3762.30
Sections Manager /wp-admin/edit.php?post_type=kc-section6.3768.90
General Settings /wp-admin/admin.php?page=kingcomposer6.3755.67
Extensions /wp-admin/admin.php?page=kc-extensions6.372,264.87

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 295 new files
Database: no new tables, 1 new option
New WordPress options
widget_kc_widget_content

Browser metrics Passed 4 tests

An overview of browser requirements for Page Builder: KingComposer - Free Drag and Drop page builder by King-Theme
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,894 ▲29816.36 ▲0.7815.79 ▲6.2351.07 ▼0.70
Dashboard /wp-admin3,012 ▲785.91 ▼0.08147.94 ▼9.41144.03 ▲21.78
Posts /wp-admin/edit.php3,610 ▲8718.25 ▲5.56192.44 ▲118.22116.06 ▲17.71
Add New Post /wp-admin/post-new.php4,603 ▲2,92021.63 ▲2.88573.40 ▲180.84150.96 ▲39.22
Media Library /wp-admin/upload.php1,800 ▼44.72 ▼0.30126.36 ▼33.66157.23 ▲27.40
Shortcode Mapper /wp-admin/admin.php?page=kc-mapper2,4068.10198.77150.72
Sections Manager /wp-admin/edit.php?post_type=kc-section1,4882.6570.7382.18
General Settings /wp-admin/admin.php?page=kingcomposer3,8789.71298.03149.36
Extensions /wp-admin/admin.php?page=kc-extensions2,7462.3558.10123.45

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_kc_widget_content

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 32× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/kingcomposer/shortcodes/live_editor/kc_column_text.php
    • > /wp-content/plugins/kingcomposer/shortcodes/live_editor/kc_video_play.php
    • > /wp-content/plugins/kingcomposer/shortcodes/live_editor/kc_column_inner.php
    • > /wp-content/plugins/kingcomposer/shortcodes/live_editor/kc_feature_box.php
    • > /wp-content/plugins/kingcomposer/shortcodes/live_editor/kc_box.php
    • > /wp-content/plugins/kingcomposer/shortcodes/live_editor/kc_counter_box.php
    • > /wp-content/plugins/kingcomposer/shortcodes/live_editor/kc_tab.php
    • > /wp-content/plugins/kingcomposer/shortcodes/live_editor/kc_icon.php
    • > /wp-content/plugins/kingcomposer/shortcodes/live_editor/kc_tabs.php
    • > /wp-content/plugins/kingcomposer/shortcodes/live_editor/kc_title.php
  • 91× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/kingcomposer/includes/single-section.php:2
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/kingcomposer/shortcodes/kc_accordion.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/kingcomposer/shortcodes/kc_blog_posts.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/kingcomposer/shortcodes/kc_carousel_post.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/kingcomposer/shortcodes/kc_flip_box.php:4
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/kingcomposer/shortcodes/kc_revslider.php on line 5
    • > PHP Warning
      extract() expects parameter 1 to be array, null given in wp-content/plugins/kingcomposer/shortcodes/kc_image_gallery.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/kingcomposer/shortcodes/kc_single_image.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/kingcomposer/shortcodes/kc_instagram_feed.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/kingcomposer/shortcodes/kc_pie_chart.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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: Too many tags (60 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt is a good inspiration

kingcomposer/kingcomposer.php 92% from 13 tests

This is the main PHP file of "Page Builder: KingComposer - Free Drag and Drop page builder by King-Theme" version 2.9.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 150 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
There were no executable files found in this plugin55,388 lines of code in 159 files:
LanguageFilesBlank linesComment linesLines of code
PHP1205,1531,36823,199
CSS121,01415214,181
JavaScript234,84379713,930
SVG4084,078

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity83.81
▷ Minimum class complexity1.00
▷ Maximum class complexity266.00
Average method complexity6.41
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods245
▷ Static methods249.80%
▷ Public methods19981.22%
▷ Protected methods104.08%
▷ Private methods3614.69%
Functions135
▷ Named functions13398.52%
▷ Anonymous functions21.48%
Constants16
▷ Global constants1168.75%
▷ Class constants531.25%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
83 PNG files occupy 0.39MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/frontend/vendors/prettyPhoto/images/prettyPhoto/dark_rounded/btnPrevious.png1.41KB1.19KB▼ 15.74%
includes/frontend/vendors/prettyPhoto/images/prettyPhoto/default/default_thumb.png1.50KB0.61KB▼ 59.47%
assets/frontend/images/testimonial/layout-2.png1.07KB0.13KB▼ 87.57%
assets/images/arrow-select-white.png1.12KB0.23KB▼ 79.27%
includes/frontend/vendors/prettyPhoto/images/prettyPhoto/facebook/contentPatternTop.png0.14KB0.11KB▼ 21.13%