62% kwit-buy-button

Code Review | Kwit Buy Button

WordPress plugin Kwit Buy Button scored62%from 54 tests.

About plugin

  • Plugin page: kwit-buy-button
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0.0-1.0.1
  • WordPress version: 6.3.1
  • First release: Apr 30, 2014
  • Latest release: Oct 1, 2014
  • Number of updates: 6
  • Update frequency: every 25.7 days
  • Top authors: savingcloud (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /758 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼1.25MB] [CPU: ▼48.11ms] Passed 4 tests

An overview of server-side resources used by Kwit Buy Button
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.00 ▼0.7318.57 ▼28.77
Dashboard /wp-admin3.04 ▼0.5221.18 ▼36.63
Posts /wp-admin/edit.php3.04 ▼0.6419.47 ▼34.46
Add New Post /wp-admin/post-new.php3.04 ▼3.1118.45 ▼92.59
Media Library /wp-admin/upload.php3.04 ▼0.4521.88 ▼16.11
Przycisk Kwit /wp-admin/options-general.php?page=kwit3.0420.61

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Kwit Buy Button
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7814.21 ▼0.222.57 ▲0.5043.23 ▼2.11
Dashboard /wp-admin2,200 ▲235.58 ▼0.0687.16 ▼7.6537.68 ▼3.65
Posts /wp-admin/edit.php2,111 ▲112.02 ▼0.1335.54 ▼2.1936.79 ▼0.36
Add New Post /wp-admin/post-new.php1,388 ▼14816.73 ▼6.24581.07 ▼13.0743.59 ▼4.22
Media Library /wp-admin/upload.php1,411 ▲174.25 ▼0.03112.86 ▲9.9947.93 ▲3.72
Przycisk Kwit /wp-admin/options-general.php?page=kwit7802.0625.8927.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=kwit
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=kwit
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/options-general.php?page=kwit
    • > Notice in wp-content/plugins/kwit-buy-button/kwit_buy_button.php+17
    Undefined index: submit

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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/kwit-buy-button/kwit_buy_button.php:55

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/options-general.php?page=kwit
    • > Javascript (severe) in unknown
    https://kwit.pl/assets/kwit_blogwidget.js 0:2377 Uncaught TypeError: Cannot read properties of null (reading 'getElementsByTagName')

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: ingredients, shopping, cooking, buying

kwit-buy-button/kwit_buy_button.php 92% from 13 tests

"Kwit Buy Button" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("kwit-buy-button.php" instead of "kwit_buy_button.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected43 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151043

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin