89% calculator-blocks

Code Review | Calculator Blocks

WordPress plugin Calculator Blocks scored89%from 54 tests.

About plugin

  • Plugin page: calculator-blocks
  • Plugin version: 1.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.3
  • WordPress version: 6.3.1
  • First release: Aug 21, 2023
  • Latest release: Sep 20, 2023
  • Number of updates: 11
  • Update frequency: every 2.8 days
  • Top authors: excelkits (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /168 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼6.37ms] Passed 4 tests

An overview of server-side resources used by Calculator Blocks
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3940.48 ▲3.80
Dashboard /wp-admin3.36 ▲0.0643.30 ▼9.71
Posts /wp-admin/edit.php3.41 ▲0.0642.17 ▼2.83
Add New Post /wp-admin/post-new.php5.95 ▲0.0681.96 ▼12.92
Media Library /wp-admin/upload.php3.28 ▲0.0632.73 ▼0.03
Excelkits /wp-admin/options-general.php?page=excelkits3.2937.01

Server storage [IO: ▲1.00MB] [DB: ▲0.11MB] Passed 3 tests

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

Browser metrics Passed 4 tests

A check of browser resources used by Calculator Blocks
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲9414.34 ▼0.041.97 ▲0.3941.84 ▲1.30
Dashboard /wp-admin2,199 ▲185.55 ▼0.1184.65 ▼25.8938.30 ▼11.17
Posts /wp-admin/edit.php2,104 ▲11.94 ▼0.0633.56 ▼2.4132.83 ▲0.36
Add New Post /wp-admin/post-new.php6,367 ▲4,83927.83 ▲4.68889.46 ▲219.3557.00 ▲1.70
Media Library /wp-admin/upload.php1,395 ▼54.17 ▼0.0197.43 ▲1.8443.47 ▼0.71
Excelkits /wp-admin/options-general.php?page=excelkits8612.0023.8533.14

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (Example calculator)
Please take inspiration from this readme.txt

calculator-blocks/excelkits-blocks.php 77% from 13 tests

"Calculator Blocks" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("calculator-blocks.php" instead of "excelkits-blocks.php")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Description: Please don't use more than 140 characters for the plugin description (currently 143 characters long)

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,269 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1173162449
JSX42438282
PHP441111265
CSS2200128
Sass216580
JSON21062
SVG1003

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods342.86%
▷ Protected methods00.00%
▷ Private methods457.14%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.94MB with 0.31MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png166.58KB168.64KB0.00%
screenshot-3.png498.59KB208.03KB▼ 58.28%
screenshot-2.png296.32KB177.23KB▼ 40.19%