10% clickbank-storefront

Code Review | Clickbank Wordpress Plugin (Storefront)

WordPress plugin Clickbank Wordpress Plugin (Storefront) scored10%from 54 tests.

About plugin

  • Plugin page: clickbank-storefront
  • Plugin version: 1.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0.2
  • WordPress version: 6.3.1
  • First release: May 7, 2016
  • Latest release: Jul 4, 2023
  • Number of updates: 330
  • Update frequency: every 11.4 days
  • Top authors: dactum (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

600+ active /45,440 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/clickbank-storefront/clickbank-storefronts.php+384
    Undefined index: cs_image_descr_layout

Server metrics [RAM: ▼1.94MB] [CPU: ▼59.50ms] Passed 4 tests

This is a short check of server-side resources used by Clickbank Wordpress Plugin (Storefront)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.414.07 ▼39.63
Dashboard /wp-admin2.07 ▼1.275.84 ▼63.03
Posts /wp-admin/edit.php2.08 ▼1.275.42 ▼46.55
Add New Post /wp-admin/post-new.php2.07 ▼3.815.70 ▼88.80
Media Library /wp-admin/upload.php2.08 ▼1.156.03 ▼28.67
Clickbank Storefronts /wp-admin/options-general.php?page=cs_menu2.085.72

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 33 new options
New WordPress options
cs_display_layout
cs_image_border_style
widget_cs_top_products_class
db_upgraded
cs_image_border
theysaidso_admin_options
cs_cats_to_omit
cs_image_size
widget_theysaidso_widget
cs_home_page_cats
...

Browser metrics Passed 4 tests

An overview of browser requirements for Clickbank Wordpress Plugin (Storefront)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,014 ▲22813.89 ▼0.7513.03 ▲11.1538.63 ▼3.51
Dashboard /wp-admin2,222 ▲255.83 ▲0.90106.60 ▼5.6141.70 ▼5.21
Posts /wp-admin/edit.php2,104 ▲42.01 ▼0.0335.55 ▼1.2436.66 ▲3.28
Add New Post /wp-admin/post-new.php1,557 ▲3118.54 ▲0.92622.06 ▲21.7453.92 ▼0.51
Media Library /wp-admin/upload.php1,401 ▲14.24 ▼0.0198.31 ▼7.2242.50 ▼5.34
Clickbank Storefronts /wp-admin/options-general.php?page=cs_menu1,6802.0222.7254.38

Uninstaller [IO: ▲0.00MB] [DB: ▲0.63MB] 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
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/clickbank-storefront/clickbank-storefronts.php+384
    Undefined index: cs_image_descr_layout
  • Zombie WordPress options were found after uninstall: 33 options
    • cs_view_other
    • cs_rank
    • cs_home_page_cats
    • cs_theme_chosen
    • cs_home_banner
    • widget_theysaidso_widget
    • can_compress_scripts
    • cs_primary_color
    • cs_reviews_show_cats
    • cs_review_banner
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/clickbank-storefronts.php+384
    Undefined index: cs_image_descr_layout
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1533
    Undefined index: user_id
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1534
    Undefined index: cs_mcat
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1535
    Undefined index: cs_scat
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1536
    Undefined index: cs_category
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1537
    Undefined index: cs_temp_main_category
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1538
    Undefined index: cs_main_category
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1539
    Undefined index: memnumber
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1541
    Undefined index: switch_view
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1542
    Undefined index: sortby
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1546
    Undefined index: tar
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1549
    Undefined index: cs_main_category_name
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1550
    Undefined index: cs_mcat_name
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1551
    Undefined index: mem
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1552
    Undefined index: cs_review_id
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1553
    Undefined index: criteria
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/functions.inc.php+1554
    Undefined index: cs_keywords
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/admin.inc.php+713
    Undefined index: cs_products_page
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/admin.inc.php+737
    Undefined variable: cat_id
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/admin.inc.php+759
    Undefined index: cs_submit
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=cs_menu
    • > Notice in wp-content/plugins/clickbank-storefront/admin.inc.php+966
    Undefined index: type

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
Please fix the following
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/clickbank-storefront/product/index.php
    • > /wp-content/plugins/clickbank-storefront/ajax_request.php
    • > /wp-content/plugins/clickbank-storefront/product.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'cs_top_products_class' not found in wp-includes/class-wp-widget-factory.php:62
    • > PHP Notice
      Undefined index: cs_plugin_dir in wp-content/plugins/clickbank-storefront/admin.inc.php on line 3
    • > PHP Notice
      Undefined offset: 5 in wp-content/plugins/clickbank-storefront/product/index.php on line 12
    • > PHP Notice
      Undefined offset: 1 in wp-content/plugins/clickbank-storefront/product/index.php on line 8
    • > PHP Notice
      Undefined index: niche in wp-content/plugins/clickbank-storefront/product.php on line 14
    • > PHP Notice
      Undefined index: tar in wp-content/plugins/clickbank-storefront/product.php on line 8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/clickbank-storefront/clickbank-storefronts.php:15
    • > PHP Notice
      Undefined offset: 4 in wp-content/plugins/clickbank-storefront/product/index.php on line 11
    • > PHP Notice
      Undefined offset: 2 in wp-content/plugins/clickbank-storefront/product/index.php on line 9
    • > PHP Notice
      Undefined index: mem in wp-content/plugins/clickbank-storefront/product.php on line 7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: You are using too many tags: 18 tag instead of maximum 10
Please take inspiration from this readme.txt

clickbank-storefront/clickbank-storefronts.php 92% from 13 tests

The main PHP file in "Clickbank Wordpress Plugin (Storefront)" ver. 1.7 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("clickbank-storefront.php" instead of "clickbank-storefronts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected5,345 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP91,2569713,703
CSS2293171,009
XML760349
JavaScript44864284

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity20.67
▷ Minimum class complexity6.00
▷ Maximum class complexity39.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods34
▷ Static methods38.82%
▷ Public methods2573.53%
▷ Protected methods00.00%
▷ Private methods926.47%
Functions64
▷ Named functions6398.44%
▷ Anonymous functions11.56%
Constants0
▷ Global constants00.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
3 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
left_arrow.png2.13KB1.02KB▼ 52.42%
logo (1).png9.77KB4.51KB▼ 53.82%
right_arrow.png2.07KB1.04KB▼ 49.93%