84% ucalc

Code Review | uCalc

WordPress plugin uCalc scored84%from 54 tests.

About plugin

  • Plugin page: ucalc
  • Plugin version: 2.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: May 10, 2017
  • Latest release: Aug 25, 2023
  • Number of updates: 17
  • Update frequency: every 135.2 days
  • Top authors: ucoz (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

1,000+ active /16,283 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼7.73ms] Passed 4 tests

This is a short check of server-side resources used by uCalc
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1142.82 ▼0.72
Dashboard /wp-admin3.41 ▲0.1151.31 ▼5.30
Posts /wp-admin/edit.php3.52 ▲0.1748.67 ▼0.70
Add New Post /wp-admin/post-new.php6.00 ▲0.1284.75 ▼23.75
Media Library /wp-admin/upload.php3.33 ▲0.1134.54 ▼1.16
uCalc /wp-admin/options-general.php?page=uCalc3.3036.18

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_ucalc_id_base
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

uCalc: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,810 ▲4914.70 ▲0.392.01 ▲0.1446.25 ▼0.48
Dashboard /wp-admin2,216 ▲365.58 ▼0.05100.18 ▲8.4044.34 ▼2.84
Posts /wp-admin/edit.php2,121 ▲212.02 ▼0.0437.09 ▼0.8034.14 ▼2.08
Add New Post /wp-admin/post-new.php6,216 ▲4,68519.19 ▼4.04891.16 ▲209.4036.31 ▼26.96
Media Library /wp-admin/upload.php1,421 ▲244.22 ▼0.1798.32 ▼14.0343.17 ▼7.75
uCalc /wp-admin/options-general.php?page=uCalc9652.3634.9727.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_recent-posts
    • widget_ucalc_id_base
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/ucalc/ucalc.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% 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
5 plugin tags: form-builder, calculator, form, forms, contact-form

ucalc/ucalc.php 92% from 13 tests

Analyzing the main PHP file in "uCalc" version 2.0.1
Please make the necessary changes and fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,456 lines of code in 20 files:
LanguageFilesBlank linesComment linesLines of code
PHP78454533
CSS76615454
JavaScript54314401
PO File1293168

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity10.75
▷ Minimum class complexity4.00
▷ Maximum class complexity15.00
Average method complexity2.30
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods30
▷ Static methods13.33%
▷ Public methods30100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
8 PNG files occupy 1.06MB with 0.73MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png40.88KB11.70KB▼ 71.38%
assets/icon-256x256.png34.39KB11.20KB▼ 67.43%
assets/screenshot-1.png190.08KB52.41KB▼ 72.43%
assets/banner-1544x500.png55.43KB27.24KB▼ 50.86%
assets/icon-128x128.png22.01KB4.46KB▼ 79.71%