84% fc-savings-calculator

Code Review | FC's Savings Calculator

WordPress plugin FC's Savings Calculator scored84%from 54 tests.

About plugin

  • Plugin page: fc-savings-calcul...
  • Plugin version: 1.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.2
  • WordPress version: 6.3.1
  • First release: Dec 10, 2016
  • Latest release: Mar 31, 2023
  • Number of updates: 46
  • Update frequency: every 50.0 days
  • Top authors: karl53 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /8,732 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.13MB] [CPU: ▼4.38ms] Passed 4 tests

Analyzing server-side resources used by FC's Savings Calculator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1345.36 ▼9.96
Dashboard /wp-admin3.44 ▲0.1356.72 ▼0.17
Posts /wp-admin/edit.php3.49 ▲0.1351.49 ▼1.54
Add New Post /wp-admin/post-new.php6.02 ▲0.1399.16 ▼5.85
Media Library /wp-admin/upload.php3.36 ▲0.1341.07 ▲1.33

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 69 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
fcsavingscalc_plugin
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by FC's Savings Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▲0.031.93 ▼0.5344.46 ▲1.01
Dashboard /wp-admin2,195 ▲275.61 ▲0.0397.88 ▼10.3943.19 ▼1.80
Posts /wp-admin/edit.php2,100 ▼01.99 ▼0.0335.92 ▼4.1032.83 ▼4.45
Add New Post /wp-admin/post-new.php1,526 ▼123.34 ▼0.04674.26 ▼42.5559.37 ▲3.49
Media Library /wp-admin/upload.php1,400 ▼34.17 ▼0.03100.32 ▼0.1243.31 ▼3.83

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

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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: date_mask in wp-content/plugins/fc-savings-calculator/en/calculator.gui.php on line 4
    • > PHP Notice
      Undefined variable: brand_name in wp-content/plugins/fc-savings-calculator/en/calculator.gui.php on line 20
    • > PHP Notice
      Undefined variable: currency in wp-content/plugins/fc-savings-calculator/en/calculator.gui.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/fc-savings-calculator/fc-savings-calculator.php:97
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/fc-savings-calculator/en/calculator.gui.php:23

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Donate link: Invalid url: ""
You can take inspiration from this readme.txt

fc-savings-calculator/fc-savings-calculator.php 92% from 13 tests

The entry point to "FC's Savings Calculator" version 1.5.4 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 220 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin14,653 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PO File141,9462,1705,125
JavaScript116599393,604
JSON14002,982
CSS63391211,873
PHP22721921,066
SVG1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin