89% simple-mortgage-calculator

Code Review | Easy Mortgage Calculator

WordPress plugin Easy Mortgage Calculator scored89%from 54 tests.

About plugin

  • Plugin page: simple-mortgage-c...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.8.1
  • WordPress version: 6.3.1
  • First release: Sep 8, 2017
  • Latest release: Sep 8, 2017
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: happycatplugins (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /901 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Easy Mortgage Calculator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.28 ▼3.39
Dashboard /wp-admin3.32 ▼0.0350.75 ▼16.56
Posts /wp-admin/edit.php3.37 ▲0.0152.05 ▲4.15
Add New Post /wp-admin/post-new.php5.90 ▲0.0197.80 ▼1.96
Media Library /wp-admin/upload.php3.24 ▲0.0135.85 ▼0.52

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_happycat_plugins_mortgage_calc_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Mortgage Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,899 ▲15314.01 ▼0.389.26 ▲7.5035.69 ▼8.68
Dashboard /wp-admin2,221 ▲365.82 ▼0.03101.25 ▼3.4044.88 ▲1.53
Posts /wp-admin/edit.php2,104 ▲121.96 ▼0.0935.33 ▼1.1732.76 ▼1.79
Add New Post /wp-admin/post-new.php1,552 ▲1818.51 ▼4.69603.58 ▼6.9350.39 ▼1.70
Media Library /wp-admin/upload.php1,403 ▲154.19 ▼0.04102.32 ▲4.4247.22 ▲2.12

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_happycat_plugins_mortgage_calc_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #4, #5 in simple-mortgage-calculator/assets to your readme.txt
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

simple-mortgage-calculator/mortgage-calculator.php 85% from 13 tests

The principal PHP file in "Easy Mortgage Calculator" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("simple-mortgage-calculator.php" instead of "mortgage-calculator.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 195 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected848 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4519297
PHP24673287
CSS35613224
Markdown123040

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
happycatlogo.png11.72KB4.49KB▼ 61.67%