83% small-business-loan-calculator

Code Review | Small business loan calculator

WordPress plugin Small business loan calculator scored 83% from 54 tests.

About plugin

  • Plugin page: small-business-lo...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.5-4.6.1
  • WordPress version: 6.3.1
  • First release: Nov 22, 2013
  • Latest release: Sep 29, 2016
  • Number of updates: 20
  • Update frequency: every 54.1 days
  • Top authors: pauljpaquin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,690 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.01MB] [CPU: ▼4.67ms] Passed 4 tests

An overview of server-side resources used by Small business loan calculator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.21 ▼4.96
Dashboard /wp-admin3.32 ▲0.0147.37 ▼3.10
Posts /wp-admin/edit.php3.37 ▲0.0150.56 ▲1.29
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.87 ▼11.90
Media Library /wp-admin/upload.php3.24 ▲0.0135.66 ▲1.54
Small Business Loan Calculator /wp-admin/options-general.php?page=small-business-loan-calculator/wc_small_business_calculator.php3.2131.64

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Small business loan calculator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲9613.35 ▼1.021.96 ▼0.1337.41 ▼10.29
Dashboard /wp-admin2,210 ▲224.89 ▼1.0197.03 ▼16.9938.49 ▼6.11
Posts /wp-admin/edit.php2,090 ▲11.99 ▼0.0435.52 ▼1.1431.98 ▼1.46
Add New Post /wp-admin/post-new.php1,541 ▲2723.17 ▲5.64669.94 ▼21.7157.78 ▼1.45
Media Library /wp-admin/upload.php1,392 ▲104.23 ▲0.0995.92 ▼0.4442.00 ▼2.86
Small Business Loan Calculator /wp-admin/options-general.php?page=small-business-loan-calculator/wc_small_business_calculator.php7782.0124.5025.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded

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 everything seems fine, this is not 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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/small-business-loan-calculator/wc_small_business_calculator.php on line 23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/small-business-loan-calculator/wc_small_business_calculator.php:33

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Screenshots: Add a description for screenshot #0 in small-business-loan-calculator/assets to your readme.txt
  • Screenshots: Screenshot #1 (Here's a screenshot of it in action.) image required
You can look at the official readme.txt

small-business-loan-calculator/wc_small_business_calculator.php 85% from 13 tests

This is the main PHP file of "Small business loan calculator" version 1.2, 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:
  • Description: The description should be shorter than 140 characters (currently 528 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("small-business-loan-calculator.php" instead of "wc_small_business_calculator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected150 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
CSS11179
PHP182171

PHP code Passed 2 tests

An short overview of 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.07
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%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.19MB with 0.12MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/btn.png6.60KB2.50KB▼ 62.03%
images/main_banner.png72.65KB25.48KB▼ 64.92%
screenshot-1.png117.56KB38.48KB▼ 67.27%