10% kontrolwp

Code Review | KontrolWP - Kontrol Wordpress Developer Kit

WordPress plugin KontrolWP - Kontrol Wordpress Developer Kit scored10%from 54 tests.

About plugin

  • Plugin page: kontrolwp
  • Plugin version: 2.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7
  • WordPress version: 6.3.1
  • First release: Oct 22, 2016
  • Latest release: Dec 13, 2016
  • Number of updates: 10
  • Update frequency: every 5.4 days
  • Top authors: skall (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /919 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/kontrolwp/index.php+16
    Function get_magic_quotes_gpc() is deprecated

Server metrics [RAM: ▼1.92MB] [CPU: ▼54.72ms] Passed 4 tests

This is a short check of server-side resources used by KontrolWP - Kontrol Wordpress Developer Kit
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.53 ▼41.51
Dashboard /wp-admin2.09 ▼1.216.02 ▼47.36
Posts /wp-admin/edit.php2.09 ▼1.266.98 ▼43.04
Add New Post /wp-admin/post-new.php2.09 ▼3.809.90 ▼86.95
Media Library /wp-admin/upload.php2.09 ▼1.144.95 ▼30.89

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 509 new files
Database: 8 new tables, 13 new options
New tables
wp_kontrolwp_cfs_groups
wp_kontrolwp_cfs_groups_pts
wp_kontrolwp_taxonomies
wp_kontrolwp_cfs_fields
wp_kontrolwp_cpts_taxs
wp_kontrolwp_cfs_types
wp_kontrolwp_cfs_rules
wp_kontrolwp_cpts
New WordPress options
db_upgraded
kontrol_version
widget_recent-comments
kontrol_module_cs
widget_kwp-recent-custom-posts
theysaidso_admin_options
can_compress_scripts
kontrol_cs_settings
widget_recent-posts
kontrol_module_cpt_tax
...

Browser metrics Passed 4 tests

A check of browser resources used by KontrolWP - Kontrol Wordpress Developer Kit
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,041 ▲28015.74 ▲1.192.14 ▼0.4039.57 ▼4.19
Dashboard /wp-admin2,415 ▲2356.72 ▲1.10112.49 ▲20.4439.59 ▲0.46
Posts /wp-admin/edit.php2,286 ▲1864.43 ▲2.4359.88 ▲24.5834.68 ▼6.24
Add New Post /wp-admin/post-new.php1,391 ▼13513.54 ▼9.74472.76 ▼220.6541.37 ▼19.08
Media Library /wp-admin/upload.php1,253 ▼1475.87 ▲1.68105.64 ▲1.1632.18 ▼15.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/kontrolwp/index.php+16
    Function get_magic_quotes_gpc() is deprecated
  • The uninstall procedure failed, leaving 8 tables in the database
    • wp_kontrolwp_taxonomies
    • wp_kontrolwp_cfs_groups_pts
    • wp_kontrolwp_cpts
    • wp_kontrolwp_cfs_fields
    • wp_kontrolwp_cpts_taxs
    • wp_kontrolwp_cfs_types
    • wp_kontrolwp_cfs_rules
    • wp_kontrolwp_cfs_groups
  • Zombie WordPress options detected upon uninstall: 13 options
    • kontrol_cs_settings
    • widget_kwp-recent-custom-posts
    • kontrol_verify_cache
    • kontrol_module_cs
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • kontrol_module_cf
    • kontrol_module_cpt_tax
    • theysaidso_admin_options
    • ...

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 11× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/kontrolwp/app/modules/app/custom_fields/views/fields/meta/text.php
    • > /wp-content/plugins/kontrolwp/js/fancyupload/script.php
    • > /wp-content/plugins/kontrolwp/app/views/layouts/wp-page.php
    • > /wp-content/plugins/kontrolwp/app/modules/app/custom_fields/views/fields/meta/date.php
    • > /wp-content/plugins/kontrolwp/app/modules/app/custom_fields/views/fields/meta/select.php
    • > /wp-content/plugins/kontrolwp/app/modules/app/custom_fields/views/fields/meta/colour.php
    • > /wp-content/plugins/kontrolwp/app/modules/app/custom_fields/views/fields/meta/checkbox.php
    • > /wp-content/plugins/kontrolwp/app/views/languages.php
    • > /wp-content/plugins/kontrolwp/app/modules/app/custom_fields/views/fields/meta/layout.php
    • > /wp-content/plugins/kontrolwp/app/modules/app/custom_fields/views/fields/meta/text-area.php
  • 225× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant URL_IMAGE - assumed 'URL_IMAGE' (this will throw an Error in a future version of PHP) in wp-content/plugins/kontrolwp/app/views/layouts/default.php on line 55
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/kontrolwp/app/controllers/widget.php:23
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/kontrolwp/app/modules/app/custom_fields/views/fields/meta/image.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/kontrolwp/app/modules/app/taxonomies/views/tax-section-tutorials.php:3
    • > PHP Warning
      require_once(APP_MODULE_PATHcustom_fields/custom_fields.php): failed to open stream: No such file or directory in wp-content/plugins/kontrolwp/app/modules/app/custom_settings/custom_settings.php on line 9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/kontrolwp/app/modules/app/custom_settings/views/cs-side-col.php:3
    • > PHP Notice
      Undefined variable: field_validation in wp-content/plugins/kontrolwp/app/modules/app/custom_fields/views/fields/meta/colour.php on line 32
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/kontrolwp/app/modules/app/custom_fields/views/fields/meta/radio.php on line 4
    • > PHP Notice
      Trying to get property 'field_key' of non-object in wp-content/plugins/kontrolwp/app/modules/app/custom_fields/views/fields/meta/image.php on line 28
    • > PHP Fatal error
      Uncaught Error: Class 'Lvc_PageController' not found in wp-content/plugins/kontrolwp/app/controllers/upload_file.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Donate link: Please fix this invalid url: ""
  • Tags: You are using too many tags: 12 tag instead of maximum 10
You can take inspiration from this readme.txt

kontrolwp/index.php 85% from 13 tests

"KontrolWP - Kontrol Wordpress Developer Kit" version 2.0.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 221 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("kontrolwp.php" instead of "index.php")

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
These items require your attention
  • Do not include executable or dangerous files in your plugin
    • .as - Adobe Flash ActionScript File in Adobe Flash
      • wp-content/plugins/kontrolwp/js/fancyupload/source/as3proj/Escaper.as
      • wp-content/plugins/kontrolwp/js/fancyupload/source/as3proj/File.as
      • wp-content/plugins/kontrolwp/js/fancyupload/source/as3proj/Main.as
25,996 lines of code in 181 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript504,3233,40813,796
PHP1112,0652,7768,746
CSS144881652,610
ActionScript323658763
XML202579
Markdown1002

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.72
Average class complexity14.58
▷ Minimum class complexity1.00
▷ Maximum class complexity86.00
Average method complexity3.44
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes49
▷ Abstract classes00.00%
▷ Concrete classes49100.00%
▷ Final classes00.00%
Methods279
▷ Static methods4114.70%
▷ Public methods24387.10%
▷ Protected methods248.60%
▷ Private methods124.30%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants33
▷ Global constants33100.00%
▷ Class constants00.00%
▷ Public constants00.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
308 compressed PNG files occupy 0.22MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/flags/mc.png0.37KB0.54KB0.00%
images/flags/ec.png0.49KB0.71KB0.00%
images/flags/scotland.png0.63KB0.67KB0.00%
images/flags/mh.png0.61KB0.72KB0.00%
images/flags/fm.png0.54KB0.66KB0.00%