79% woocommerce-ksini-com-item-cost

Code Review | Woocommerce Ksini.com Item Cost

WordPress plugin Woocommerce Ksini.com Item Cost scored79%from 54 tests.

About plugin

  • Plugin page: woocommerce-ksini...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9
  • WordPress version: 6.3.1
  • First release: May 15, 2014
  • Latest release: May 15, 2014
  • Number of updates: 9
  • Update frequency: every 0.7 days
  • Top authors: havban (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /949 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▼1.82MB] [CPU: ▼58.37ms] Passed 4 tests

Analyzing server-side resources used by Woocommerce Ksini.com Item Cost
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.74 ▲2.31
Dashboard /wp-admin2.13 ▼1.217.43 ▼53.93
Posts /wp-admin/edit.php2.13 ▼1.226.57 ▼44.41
Add New Post /wp-admin/post-new.php2.13 ▼3.756.72 ▼106.41
Media Library /wp-admin/upload.php2.13 ▼1.096.31 ▼28.74

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Woocommerce Ksini.com Item Cost
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,830 ▲8413.32 ▼0.914.77 ▲3.2243.24 ▲3.93
Dashboard /wp-admin2,239 ▲545.91 ▲1.0195.39 ▼6.9874.65 ▲30.28
Posts /wp-admin/edit.php2,125 ▲362.11 ▲0.1034.59 ▼3.2834.50 ▲2.43
Add New Post /wp-admin/post-new.php1,550 ▲3118.09 ▼4.92594.52 ▼0.0639.86 ▼12.19
Media Library /wp-admin/upload.php1,421 ▲334.36 ▲0.1399.18 ▼1.8076.62 ▲32.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > User notice in wp-includes/functions.php+5905
    Function wp_enqueue_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the jquery-ui-datepicker handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === woocommerce-ksini-com-item-cost === )
You can look at the official readme.txt

woocommerce-ksini-com-item-cost/item-cost.php 92% from 13 tests

The entry point to "Woocommerce Ksini.com Item Cost" version 1.3 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("woocommerce-ksini-com-item-cost.php" instead of "item-cost.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 detected1,773 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
CSS3741191,481
PHP36070292

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity18.00
▷ Minimum class complexity18.00
▷ Maximum class complexity18.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
14 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/smoothness/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png0.32KB0.15KB▼ 54.82%
css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png0.26KB0.15KB▼ 42.37%
css/smoothness/images/ui-icons_888888_256x240.png6.83KB4.17KB▼ 38.92%
css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png0.33KB0.12KB▼ 62.09%