84% gf-total-amount-shortcode

Code Review | Gravity Forms Total Amount Shortcode

WordPress plugin Gravity Forms Total Amount Shortcode scored 84% from 54 tests.

About plugin

  • Plugin page: gf-total-amount-s...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Sep 18, 2017
  • Latest release: Sep 18, 2017
  • Number of updates: 3
  • Update frequency: every 2.0 days
  • Top authors: prontotools (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 874 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.07ms] Passed 4 tests

A check of server-side resources used by Gravity Forms Total Amount Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0035.75 ▼1.68
Dashboard /wp-admin3.31 ▲0.0040.11 ▼7.66
Posts /wp-admin/edit.php3.36 ▲0.0048.40 ▼2.84
Add New Post /wp-admin/post-new.php5.89 ▲0.0078.07 ▼24.11
Media Library /wp-admin/upload.php3.23 ▲0.0035.31 ▲0.71

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
widget_recent-comments
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Gravity Forms Total Amount Shortcode
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.20 ▼1.151.71 ▼0.0937.73 ▼4.87
Dashboard /wp-admin2,209 ▲184.83 ▼1.07110.84 ▲5.8840.62 ▼3.51
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0138.37 ▼4.8936.95 ▲1.64
Add New Post /wp-admin/post-new.php1,519 ▼1423.45 ▲5.10701.78 ▲21.3259.89 ▼11.05
Media Library /wp-admin/upload.php1,385 ▼34.19 ▼0.0294.25 ▼3.4341.60 ▼1.91

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

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
Even though no errors were found, 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 take a closer look at the following
  • 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/gf-total-amount-shortcode/gravityforms-total-amount-shortcode.php:55

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
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
7 plugin tags: field, count, total, shortcode, amount...

gf-total-amount-shortcode/gravityforms-total-amount-shortcode.php 92% from 13 tests

The entry point to "Gravity Forms Total Amount Shortcode" version 1.0.0 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("gf-total-amount-shortcode.php" instead of "gravityforms-total-amount-shortcode.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin206 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
Dockerfile1244119
PHP191036
Bourne Shell17429
Markdown15022

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon.png11.36KB5.48KB▼ 51.73%
assets/banner.png22.49KB10.03KB▼ 55.41%