74% reactive-mortgage-calculator

Code Review | Reactive Mortgage Calculator

WordPress plugin Reactive Mortgage Calculator scored74%from 54 tests.

About plugin

  • Plugin page: reactive-mortgage...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.0.2
  • WordPress version: 6.3.1
  • First release: Oct 5, 2017
  • Latest release: Dec 21, 2018
  • Number of updates: 4
  • Update frequency: every 110.5 days
  • Top authors: afzal_du (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

700+ active /5,440 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.63MB] [CPU: ▼21.84ms] Passed 4 tests

Server-side resources used by Reactive Mortgage Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0638.46 ▼2.56
Dashboard /wp-admin3.36 ▲0.0146.11 ▼19.82
Posts /wp-admin/edit.php3.47 ▲0.1151.32 ▲3.14
Add New Post /wp-admin/post-new.php3.24 ▼2.6535.22 ▼64.29
Media Library /wp-admin/upload.php3.28 ▲0.0536.35 ▼0.68

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 25 new files
Database: 1 new table, 6 new options
New tables
wp_srzmrt_instances
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Reactive Mortgage Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲8613.77 ▼0.8512.59 ▲10.5241.76 ▼1.31
Dashboard /wp-admin2,219 ▲405.84 ▼0.03102.97 ▼2.0637.99 ▼6.08
Posts /wp-admin/edit.php2,105 ▲162.03 ▲0.0240.11 ▲2.9935.87 ▼0.25
Add New Post /wp-admin/post-new.php1,555 ▲4118.64 ▲1.16604.18 ▼80.4856.65 ▼4.56
Media Library /wp-admin/upload.php1,404 ▲134.25 ▲0.0393.44 ▼4.9040.97 ▼4.26

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
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_srzmrt_instances
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reactive-mortgage-calculator/admin/index.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reactive-mortgage-calculator/reactive-mortgage-calculator.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/reactive-mortgage-calculator/site/index.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reactive-mortgage-calculator/api/admin/settings.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reactive-mortgage-calculator/api/admin/settings.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/reactive-mortgage-calculator/api/admin/settings.php:34

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)
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention: The official readme.txt is a good inspiration

reactive-mortgage-calculator/reactive-mortgage-calculator.php Passed 13 tests

"Reactive Mortgage Calculator" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
66 characters long description:
Responsive and Reactive mortgage calculator that you can customize

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
No dangerous file extensions were detected26,498 lines of code in 21 files:
LanguageFilesBlank linesComment linesLines of code
CSS53,40386515,464
JavaScript82,8512,85610,729
PHP88041305

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods6100.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions2090.91%
▷ Anonymous functions29.09%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/resources/instagram-icon.png1.32KB0.55KB▼ 58.48%