84% calculate-values-with-shortcodes

Code Review | Calculate Values with Shortcodes

WordPress plugin Calculate Values with Shortcodes scored 84% from 54 tests.

About plugin

  • Plugin page: calculate-values-...
  • Plugin version: 2.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.4
  • WordPress version: 6.3.1
  • First release: May 25, 2018
  • Latest release: May 20, 2020
  • Number of updates: 13
  • Update frequency: every 55.9 days
  • Top authors: bhagwad (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

300+ active / 2,827 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.01MB] [CPU: ▼4.65ms] Passed 4 tests

Server-side resources used by Calculate Values with Shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.38 ▲0.69
Dashboard /wp-admin3.31 ▲0.0148.76 ▼2.73
Posts /wp-admin/edit.php3.37 ▲0.0147.11 ▼13.30
Add New Post /wp-admin/post-new.php5.90 ▲0.0193.48 ▼3.25
Media Library /wp-admin/upload.php3.24 ▲0.0035.90 ▲1.76

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Calculate Values with Shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4314.74 ▲0.381.81 ▼0.1548.91 ▼2.31
Dashboard /wp-admin2,209 ▲214.85 ▼0.03103.25 ▼7.7440.15 ▼6.28
Posts /wp-admin/edit.php2,092 ▲32.00 ▼0.0536.58 ▼3.8431.49 ▼6.55
Add New Post /wp-admin/post-new.php1,542 ▲818.34 ▼4.75612.71 ▼21.8054.50 ▼2.98
Media Library /wp-admin/upload.php1,388 ▼04.30 ▲0.0896.14 ▼4.7841.74 ▼0.93

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts

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
Good news, no errors were detected

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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/calculate-values-with-shortcodes/calculate-values-shortcodes.php:42

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: shortcodes, calculated fields, evaluation

calculate-values-with-shortcodes/calculate-values-shortcodes.php 92% from 13 tests

This is the main PHP file of "Calculate Values with Shortcodes" version 2.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("calculate-values-with-shortcodes.php" instead of "calculate-values-shortcodes.php")

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
Success! There were no dangerous files found in this plugin270 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP254106270

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity41.00
▷ Minimum class complexity2.00
▷ Maximum class complexity80.00
Average method complexity8.27
▷ Minimum method complexity1.00
▷ Maximum method complexity44.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.24MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png73.08KB38.13KB▼ 47.83%
assets/screenshot-1.png58.80KB30.83KB▼ 47.57%
assets/screenshot-2.png115.09KB47.29KB▼ 58.91%