89% calcurates-for-woocommerce

Code Review | Calcurates for WooCommerce

WordPress plugin Calcurates for WooCommerce scored89%from 54 tests.

About plugin

  • Plugin page: calcurates-for-wo...
  • Plugin version: 1.6.3
  • PHP compatiblity: 7.2.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.3
  • WordPress version: 6.3.1
  • First release: May 21, 2021
  • Latest release: Oct 6, 2023
  • Number of updates: 34
  • Update frequency: every 25.5 days
  • Top authors: calcurates (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10+ active /1,429 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.01MB] [CPU: ▼13.07ms] Passed 4 tests

Analyzing server-side resources used by Calcurates for WooCommerce
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.32 ▼14.20
Dashboard /wp-admin3.31 ▼0.0447.55 ▼13.01
Posts /wp-admin/edit.php3.36 ▲0.0045.86 ▼4.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0080.99 ▼20.99
Media Library /wp-admin/upload.php3.23 ▲0.0034.60 ▼0.80

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 72 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Calcurates for WooCommerce
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.27 ▼0.161.76 ▲0.1944.45 ▲6.26
Dashboard /wp-admin2,189 ▲95.52 ▼0.1582.52 ▼5.9937.17 ▼7.00
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0733.84 ▼6.1234.43 ▼3.75
Add New Post /wp-admin/post-new.php1,531 ▲523.25 ▼0.20682.97 ▼0.2766.76 ▲11.35
Media Library /wp-admin/upload.php1,403 ▲34.19 ▲0.0593.32 ▼6.6039.78 ▼4.08

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Tags: Please delete some tags, you are using 14 tag instead of maximum 10
Please take inspiration from this readme.txt

calcurates-for-woocommerce/wc-calcurates.php 92% from 13 tests

Analyzing the main PHP file in "Calcurates for WooCommerce" version 1.6.3
The following require your attention:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("calcurates-for-woocommerce.php" instead of "wc-calcurates.php")

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
No dangerous file extensions were detected3,264 lines of code in 70 files:
LanguageFilesBlank linesComment linesLines of code
PHP366038972,687
JavaScript304526496
JSON20044
CSS26037

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.57
Average class complexity15.33
▷ Minimum class complexity1.00
▷ Maximum class complexity106.00
Average method complexity3.48
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces9
Interfaces0
Traits0
Classes27
▷ Abstract classes13.70%
▷ Concrete classes2696.30%
▷ Final classes00.00%
Methods151
▷ Static methods2818.54%
▷ Public methods12482.12%
▷ Protected methods00.00%
▷ Private methods2717.88%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants11
▷ Global constants19.09%
▷ Class constants1090.91%
▷ Public constants10100.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