62% corksy

Code Review | Corksy

WordPress plugin Corksy scored 62% from 54 tests.

About plugin

  • Plugin page: corksy
  • Plugin version: 0.0.16
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 6.3.1
  • First release: Apr 16, 2022
  • Latest release: May 30, 2022
  • Number of updates: 28
  • Update frequency: every 1.7 days
  • Top authors: vinodevelopment (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 375 total downloads


Plugin footprint 47% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼2.59ms] Passed 4 tests

Server-side resources used by Corksy
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.71 ▲0.03
Dashboard /wp-admin3.31 ▲0.0044.20 ▲1.98
Posts /wp-admin/edit.php3.36 ▲0.0046.34 ▼3.14
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.21 ▼5.95
Media Library /wp-admin/upload.php3.23 ▲0.0033.69 ▼1.31

Server storage [IO: ▲165.90MB] [DB: ▲0.00MB] 67% from 3 tests

A short overview of filesystem and database impact
Please try to fix the following items
  • The filesystem usage should be lower than 25MB (currently using 165.90MB)
Filesystem: 2,019 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

An overview of browser requirements for Corksy
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.041.52 ▼0.2240.03 ▼3.77
Dashboard /wp-admin2,203 ▲155.79 ▲0.8893.48 ▼21.6139.47 ▼4.36
Posts /wp-admin/edit.php2,092 ▲32.05 ▲0.0839.04 ▲4.7034.79 ▲1.62
Add New Post /wp-admin/post-new.php1,535 ▼723.14 ▲4.99689.92 ▲55.4563.74 ▲7.24
Media Library /wp-admin/upload.php1,388 ▼04.19 ▲0.0193.08 ▼6.0142.10 ▼3.03

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/corksy/uninstall.php+15
    Use of undefined constant CKSY_PATH - assumed 'CKSY_PATH' (this will throw an Error in a future version of PHP)
  • The plugin did not uninstall successfully, leaving 2,019 files (165.90MB) in the plugin directory
    • (new file) assets/css/bootstrap.rtl.min.css.map
    • (new file) assets/fonts/Roboto/Roboto-Black-webfont.eot
    • (new file) assets/fonts/Roboto/Roboto-Black-webfont.svg
    • (new file) Corksy_Setup_Class.php
    • (new file) assets/css/bootstrap.rtl.min.css
    • (new file) assets/fonts/Roboto/Roboto-Black-webfont.ttf
    • (new file) assets/css/bootstrap.min.css.map
    • (new file) assets/css/bootstrap.min.css
    • (new file) assets/fonts/Roboto/Roboto-Black-webfont.woff
    • (new file) assets/css/wine.css
    • ...
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • db_upgraded
    • recovery_mode_email_last_sent
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 8× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'AbstractBlock' not found in wp-content/plugins/corksy/corksy-commerce-blocks/BlockTypes/Orders.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'AbstractBlock' not found in wp-content/plugins/corksy/corksy-commerce-blocks/BlockTypes/WineClubs.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'AbstractBlock' not found in wp-content/plugins/corksy/corksy-commerce-blocks/BlockTypes/WineEventBooking.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/corksy/corksy-admin/includes/class-create-admin-menu.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'AbstractBlock' not found in wp-content/plugins/corksy/corksy-commerce-blocks/BlockTypes/WineEvents.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'AbstractBlock' not found in wp-content/plugins/corksy/corksy-commerce-blocks/BlockTypes/Register.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'AbstractBlock' not found in wp-content/plugins/corksy/corksy-commerce-blocks/BlockTypes/Account.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'AbstractBlock' not found in wp-content/plugins/corksy/corksy-commerce-blocks/BlockTypes/Subscription.php:8

User-side errors Passed 1 test

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


Plugin configuration 73% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Screenshots: Please describe screenshot #0 in corksy/assets to your readme.txt
  • Tags: Please add at least on tag
The official readme.txt is a good inspiration

corksy/corksycommerce.php 54% from 13 tests

This is the main PHP file of "Corksy" version 0.0.16, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Requires PHP: Required version must match the one declared in readme.txt ("5.5" instead of "7.0")
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("corksy.php" instead of "corksycommerce.php")
  • Description: Make the plugin description longer than 10 characters (currently 7 characters long)
  • Domain Path: The domain path is invalid: folder "/i18n/languages/" does not exist
  • Requires at least: Required version must match the one declared in readme.txt ("4.9" instead of "5.6")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected1,438,834 lines of code in 1,926 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity1.68
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.22
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
▷ Abstract classes26.45%
▷ Concrete classes2993.55%
▷ Final classes13.45%
▷ Static methods1111.58%
▷ Public methods8690.53%
▷ Protected methods66.32%
▷ Private methods33.16%
▷ Named functions3100.00%
▷ Anonymous functions00.00%
▷ Global constants9100.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
3 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/wine-pic-1.png16.33KB6.77KB▼ 58.56%
assets/images/wine-pic-2.png18.87KB7.96KB▼ 57.84%
assets/images/prod-pic.png38.99KB18.60KB▼ 52.30%