78% niche-self-employment-mortgage-calculator

Code Review | Niche Self Employed Mortgage Calculator

WordPress plugin Niche Self Employed Mortgage Calculator scored78%from 54 tests.

About plugin

  • Plugin page: niche-self-employ...
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.5
  • WordPress version: 6.3.1
  • First release: Dec 4, 2020
  • Latest release: Dec 4, 2020
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: nichemortgages (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /379 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼10.49ms] Passed 4 tests

An overview of server-side resources used by Niche Self Employed Mortgage Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.37 ▼7.02
Dashboard /wp-admin3.34 ▲0.0349.54 ▼15.03
Posts /wp-admin/edit.php3.39 ▲0.0352.55 ▼5.62
Add New Post /wp-admin/post-new.php5.94 ▲0.0579.65 ▼14.30
Media Library /wp-admin/upload.php3.26 ▲0.0337.57 ▲0.52
Niche SE Calculator /wp-admin/options-general.php?page=ssmc-options3.2331.60

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Niche Self Employed Mortgage Calculator
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7713.52 ▼0.841.73 ▼0.7539.05 ▼4.04
Dashboard /wp-admin2,229 ▲385.06 ▼0.75111.13 ▲6.0737.41 ▼4.77
Posts /wp-admin/edit.php2,114 ▲252.31 ▲0.3140.41 ▲2.9534.76 ▲0.33
Add New Post /wp-admin/post-new.php1,531 ▲12023.62 ▲5.89669.24 ▲100.2737.28 ▼5.96
Media Library /wp-admin/upload.php1,411 ▲204.36 ▲0.21106.02 ▲2.5544.97 ▲1.87
Niche SE Calculator /wp-admin/options-general.php?page=ssmc-options1,0522.3146.8921.75

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/niche-self-employment-mortgage-calculator/template/calculator.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Conobe\\add_action() in wp-content/plugins/niche-self-employment-mortgage-calculator/lib/SelfEmployedMortgageCalculator.php:47

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=ssmc-options
    • > Network (severe)
    wp-content/plugins/niche-self-employment-mortgage-calculator/lib/my-script.js?ver=6.3.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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
6 plugin tags: self employed calculator, director mortgage calculator, soletrader mortgage calculator, niche, uk...

niche-self-employment-mortgage-calculator/niche-self-employed-mortgage-calculator.php 85% from 13 tests

"Niche Self Employed Mortgage Calculator" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 156 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("niche-self-employment-mortgage-calculator.php" instead of "niche-self-employed-mortgage-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 detected456 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP313986280
CSS1190122
JavaScript214054

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.09
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions00.00%
▷ Anonymous functions4100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.05MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-original.png11.87KB1.57KB▼ 86.78%
assets/icon-128x128.png13.47KB3.49KB▼ 74.12%
assets/icon-256x256.png23.90KB9.94KB▼ 58.40%