94% addons-for-kingcomposer

Code Review | Addons for KingComposer

WordPress plugin Addons for KingComposer scored 94% from 54 tests.

About plugin

  • Plugin page: addons-for-kingco...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.7
  • WordPress version: 5.9.2
  • First release: Apr 19, 2017
  • Latest release: Apr 19, 2017
  • Number of updates: 5
  • Update frequency: every 21.4 days
  • Top authors: themebon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active / 8,195 total downloads

Benchmarks

Plugin footprint Passed 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: ▼0.02MB] [CPU: ▼293.72ms] Passed 4 tests

Analyzing server-side resources used by Addons for KingComposer
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.4054.85 ▲34.90
Dashboard /wp-admin3.41 ▲0.0033.13 ▼0.09
Posts /wp-admin/edit.php3.65 ▲0.0037.01 ▲1.11
Add New Post /wp-admin/post-new.php6.88 ▼0.0991.81 ▼1,177.65
Media Library /wp-admin/upload.php3.30 ▲0.0025.59 ▲1.76

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 43 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Addons for KingComposer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,781 ▲2315.55 ▼0.406.00 ▼0.243.21 ▲0.40
Dashboard /wp-admin2,881 ▲206.09 ▼0.06118.32 ▼16.67153.91 ▼5.96
Posts /wp-admin/edit.php2,691 ▲343.24 ▲0.0165.67 ▲0.48141.72 ▲1.82
Add New Post /wp-admin/post-new.php1,711 ▲5020.79 ▲4.75430.27 ▲6.00159.43 ▼1.82
Media Library /wp-admin/upload.php1,701 ▲35.53 ▲0.02148.65 ▲13.02184.98 ▼10.60

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% 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 50% 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
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addons-for-kingcomposer/shortcodes/info-box/info-box.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addons-for-kingcomposer/shortcodes/flip-box/flip-box.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addons-for-kingcomposer/shortcodes/hover-effects/hover-effects.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addons-for-kingcomposer/shortcodes/before-after/before-after.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addons-for-kingcomposer/shortcodes/service-box/service-box.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addons-for-kingcomposer/shortcodes/flip-box-3d/flip-box-3d.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addons-for-kingcomposer/shortcodes/promo-box/promo-box.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 52 tag instead of maximum 10
The official readme.txt might help

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

The main PHP script in "Addons for KingComposer" version 1.0.0 is automatically included on every request by WordPress
83 characters long description:
Impressive modern yet powerful shortcode collections for KingComposer page builder.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin14,121 lines of code in 31 files:
LanguageFilesBlank linesComment linesLines of code
CSS17603809,983
PHP9667153,117
SVG100565
JavaScript4141106456

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.82
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
6 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/flipbox_icon.png1.67KB1.01KB▼ 39.52%
admin/img/infobox_icon.png0.61KB0.46KB▼ 23.96%
admin/img/hover_effects_icon.png2.06KB1.21KB▼ 41.43%
admin/img/pronobox_icon.png0.42KB0.30KB▼ 28.37%
admin/img/beforeafter_icon.png1.36KB0.53KB▼ 61.42%