84% ascode-woo-calculator

Code Review | AsCode Woo Calculator - Build Load Calculator for Eletronics Woocommerce Shop & Help Customer to Suggest Product

WordPress plugin AsCode Woo Calculator - Build Load Calculator for Eletronics Woocommerce Shop & Help Customer to Suggest Product scored84%from 54 tests.

About plugin

  • Plugin page: ascode-woo-calcul...
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3.2
  • WordPress version: 6.3.1
  • First release: Nov 18, 2023
  • Latest release: Nov 18, 2023
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: adnan159 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /12 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.15MB] [CPU: ▼9.85ms] Passed 4 tests

Server-side resources used by AsCode Woo Calculator - Build Load Calculator for Eletronics Woocommerce Shop & Help Customer to Suggest Product
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1135.39 ▼5.75
Dashboard /wp-admin3.53 ▲0.1844.37 ▼18.10
Posts /wp-admin/edit.php3.58 ▲0.2248.82 ▼0.51
Add New Post /wp-admin/post-new.php6.05 ▲0.1682.32 ▼15.02
Media Library /wp-admin/upload.php3.39 ▲0.1634.95 ▲1.57

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
ascode_installed_time
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

AsCode Woo Calculator - Build Load Calculator for Eletronics Woocommerce Shop & Help Customer to Suggest Product: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲13414.09 ▼0.3176.06 ▲74.0727.12 ▼17.62
Dashboard /wp-admin2,210 ▲305.61 ▼0.0391.85 ▼8.3241.70 ▼4.14
Posts /wp-admin/edit.php2,118 ▲182.00 ▼0.0140.22 ▲2.6538.89 ▲3.52
Add New Post /wp-admin/post-new.php1,541 ▲1223.21 ▲0.07689.61 ▲7.3454.39 ▲1.00
Media Library /wp-admin/upload.php1,421 ▲274.21 ▼0.0499.93 ▲5.1139.94 ▼3.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 7 options
    • ascode_installed_time
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however 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 fix the following items
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/ascode-woo-calculator/views/admin-view.php

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 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
6 plugin tags: product suggestion, load calculation, energy supply, eletronics load, energy...

ascode-woo-calculator/ascode-woo-calculator.php 85% from 13 tests

The main file in "AsCode Woo Calculator - Build Load Calculator for Eletronics Woocommerce Shop & Help Customer to Suggest Product" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Requires at least: Required version does not match the one declared in readme.txt ("4.4" instead of "5.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin63,737 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript213,69414,72761,996
PHP20240544960
CSS1082758
JSON20023

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity8.43
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.49
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes14
▷ Abstract classes00.00%
▷ Concrete classes14100.00%
▷ Final classes17.14%
Methods71
▷ Static methods1926.76%
▷ Public methods6794.37%
▷ Protected methods00.00%
▷ Private methods45.63%
Functions4
▷ Named functions375.00%
▷ Anonymous functions125.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.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
There were not PNG files found in your plugin