10% kwik-framework

Code Review | Kwik Framework

WordPress plugin Kwik Framework scored10%from 54 tests.

About plugin

  • Plugin page: kwik-framework
  • Plugin version: 0.5.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Dec 18, 2014
  • Latest release: Jan 21, 2016
  • Number of updates: 35
  • Update frequency: every 11.5 days
  • Top authors: kevinchappell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /757 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/kwik-framework/widgets/latest_posts.php+29
    Methods with the same name as their class will not be constructors in a future version of PHP; Kwik_Latest_Posts_Widget has a deprecated constructor

Server metrics [RAM: ▼1.53MB] [CPU: ▼58.30ms] Passed 4 tests

Server-side resources used by Kwik Framework
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.47 ▼1.008.09 ▼34.67
Dashboard /wp-admin2.49 ▼0.867.89 ▼61.14
Posts /wp-admin/edit.php2.49 ▼0.877.99 ▼41.35
Add New Post /wp-admin/post-new.php2.49 ▼3.407.95 ▼96.02
Media Library /wp-admin/upload.php2.49 ▼0.758.66 ▼25.90
Kwik Framework /wp-admin/options-general.php?page=kwik_framework2.498.01

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 38 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
recovery_mode_email_last_sent
widget_latest-posts-widget
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Kwik Framework
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.35 ▼0.011.74 ▲0.0247.53 ▼3.59
Dashboard /wp-admin2,219 ▲425.67 ▼0.0187.10 ▼12.3937.38 ▼7.83
Posts /wp-admin/edit.php2,131 ▲312.03 ▲0.0338.29 ▼0.1636.58 ▼2.90
Add New Post /wp-admin/post-new.php1,543 ▲1722.93 ▼0.23677.14 ▲4.3753.40 ▼1.16
Media Library /wp-admin/upload.php1,425 ▲254.20 ▼0.00102.09 ▼6.4444.72 ▼1.80
Kwik Framework /wp-admin/options-general.php?page=kwik_framework6991.517.0923.11

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/kwik-framework/widgets/latest_posts.php+29
    Methods with the same name as their class will not be constructors in a future version of PHP; Kwik_Latest_Posts_Widget has a deprecated constructor
  • This plugin does not fully uninstall, leaving 8 options in the database
    • recovery_mode_email_last_sent
    • widget_recent-posts
    • db_upgraded
    • widget_latest-posts-widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=kwik_framework
    • > Deprecated in wp-content/plugins/kwik-framework/widgets/latest_posts.php+29
    Methods with the same name as their class will not be constructors in a future version of PHP; Kwik_Latest_Posts_Widget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=kwik_framework
    • > Notice in wp-content/plugins/kwik-framework/inc/class.kwik-settings.php+168
    Array to string conversion
    • > GET request to /wp-admin/options-general.php?page=kwik_framework
    • > Notice in wp-content/plugins/kwik-framework/inc/class.kwik-settings.php+168
    Undefined property: KwikInputs::$Array
    • > GET request to /wp-admin/options-general.php?page=kwik_framework
    • > Notice in wp-content/plugins/kwik-framework/inc/class.kwik-settings.php+168
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/options-general.php?page=kwik_framework
    • > Error in wp-content/plugins/kwik-framework/inc/class.kwik-settings.php+168
    Uncaught Error: Function name must be a string in wp-content/plugins/kwik-framework/inc/class.kwik-settings.php:168
    Stack trace:
    #0 wp-content/plugins/kwik-framework/inc/class.kwik-settings.php(138): KwikSettings::settings_fields()
    #1 wp-content/plugins/kwik-framework/inc/class.kwik-settings.php(102): KwikSettings::build_sections()
    #2 wp-content/plugins/kwik-framework/inc/settings.php(25): KwikSettings::settings_sections()
    #3 wp-includes/class-wp-hook.php(310): kwik_framework_settings()
    #4 wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters()
    #5 wp-includes/plugin.php(517): WP_Hook->do_action()
    #6 wp-admin/admin.php(259): do_action()
    #7 wp-admin/options-general.php(10): require_once('/var/www/wordpr...')
    #8 {main}
    thrown

SRP 50% 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 fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function untrailingslashit() in wp-content/plugins/kwik-framework/kwik-framework.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kwik-framework/inc/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'KwikInputs' not found in wp-content/plugins/kwik-framework/inc/class.kwik-validate.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Kwik\\Ajax\\add_action() in wp-content/plugins/kwik-framework/inc/class.kwik-ajax.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kwik-framework/widgets/latest_posts.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: common, options, framework, widgets, settings

kwik-framework/kwik-framework.php Passed 13 tests

The primary PHP file in "Kwik Framework" version 0.5.7 is used by WordPress to initiate all plugin functionality
75 characters long description:
Reusable utilities and inputs to aid in WordPress theme and plugin creation

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,212 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP133373931,607
CSS31114478
JavaScript22836127

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity26.00
▷ Minimum class complexity2.00
▷ Maximum class complexity76.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods85
▷ Static methods2731.76%
▷ Public methods7385.88%
▷ Protected methods00.00%
▷ Private methods1214.12%
Functions13
▷ Named functions1292.31%
▷ Anonymous functions17.69%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
12 PNG files occupy 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/child_link_active.png0.95KB0.14KB▼ 84.88%
images/icons/clear.png1.75KB0.83KB▼ 52.23%
images/icons/edit.png1.29KB0.83KB▼ 35.41%
images/icons/work.png0.83KB0.69KB▼ 16.82%
images/icons/link_box.png0.71KB0.73KB0.00%