10% simple-finance-calculator

Code Review | Simple Finance Calculator

WordPress plugin Simple Finance Calculator scored10%from 54 tests.

About plugin

  • Plugin page: simple-finance-ca...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.0
  • WordPress version: 6.3.1
  • First release: Jul 29, 2013
  • Latest release: Sep 4, 2014
  • Number of updates: 16
  • Update frequency: every 25.3 days
  • Top authors: weissmike (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active /4,089 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/simple-finance-calculator/simple-finanace-calculator.php+215
    Function create_function() is deprecated

Server metrics [RAM: ▼1.89MB] [CPU: ▼54.77ms] Passed 4 tests

Server-side resources used by Simple Finance Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.09 ▼1.376.08 ▼34.86
Dashboard /wp-admin2.11 ▼1.195.73 ▼45.91
Posts /wp-admin/edit.php2.11 ▼1.247.10 ▼47.09
Add New Post /wp-admin/post-new.php2.11 ▼3.776.67 ▼91.21
Media Library /wp-admin/upload.php2.11 ▼1.126.48 ▼29.82

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_sfc_widget
widget_recent-comments
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

Simple Finance Calculator: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲8113.37 ▼1.041.95 ▲0.1441.01 ▼3.14
Dashboard /wp-admin2,209 ▲215.88 ▲0.8998.54 ▼8.9138.97 ▼8.56
Posts /wp-admin/edit.php2,086 ▼01.99 ▼0.1336.94 ▲0.1234.44 ▼3.86
Add New Post /wp-admin/post-new.php1,533 ▲1423.04 ▼0.37649.77 ▼63.2552.50 ▼9.84
Media Library /wp-admin/upload.php1,391 ▲64.17 ▲0.0599.76 ▼11.3045.26 ▼4.25

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Uninstall procedure had uncaught errors
    • > Deprecated in wp-content/plugins/simple-finance-calculator/simple-finanace-calculator.php+215
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-comments
    • widget_sfc_widget
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • 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
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/simple-finance-calculator/simple-finanace-calculator.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: shortcode, payments, mortgage, financing, finance...

simple-finance-calculator/simple-finanace-calculator.php 92% from 13 tests

This is the main PHP file of "Simple Finance Calculator" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("simple-finance-calculator.php" instead of "simple-finanace-calculator.php")

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
No dangerous file extensions were detected157 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12836151
CSS1006

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.67
Average class complexity20.00
▷ Minimum class complexity3.00
▷ Maximum class complexity37.00
Average method complexity5.75
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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