89% property-hive-mortgage-calculator

Code Review | Property Hive Mortgage Calculator

WordPress plugin Property Hive Mortgage Calculator scored 89% from 54 tests.

About plugin

  • Plugin page: property-hive-mor...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.7.2
  • WordPress version: 6.3.1
  • First release: Aug 24, 2016
  • Latest release: Jun 15, 2021
  • Number of updates: 12
  • Update frequency: every 147.0 days
  • Top authors: PropertyHive (100%)

Code review

54 tests

User reviews

1 review

Install metrics

700+ active / 3,842 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
Install script ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼4.15ms] Passed 4 tests

Server-side resources used by Property Hive Mortgage Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0141.16 ▲2.12
Dashboard /wp-admin3.31 ▲0.0143.80 ▼4.35
Posts /wp-admin/edit.php3.36 ▲0.0046.50 ▼0.13
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.87 ▼14.24
Media Library /wp-admin/upload.php3.23 ▲0.0038.18 ▲5.73

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Property Hive Mortgage Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.26 ▼1.401.76 ▲0.1346.55 ▲5.75
Dashboard /wp-admin2,206 ▲215.79 ▲0.9195.84 ▼4.2538.89 ▼3.25
Posts /wp-admin/edit.php2,089 ▼02.06 ▲0.0233.32 ▼5.1934.38 ▲3.17
Add New Post /wp-admin/post-new.php1,533 ▲1923.00 ▲5.40671.35 ▲86.3466.24 ▲19.84
Media Library /wp-admin/upload.php1,391 ▲94.20 ▼0.0997.05 ▼6.5341.78 ▼2.60

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

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

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means 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 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Tags: There are too many tags (11 tag instead of maximum 10)
Please take inspiration from this readme.txt

property-hive-mortgage-calculator/propertyhive-mortgage-calculator.php 92% from 13 tests

Analyzing the main PHP file in "Property Hive Mortgage Calculator" version 1.0.4
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("property-hive-mortgage-calculator.php" instead of "propertyhive-mortgage-calculator.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin149 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP2424497
JavaScript16047
CSS1005

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 issues
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.29
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods7
▷ Static methods114.29%
▷ Public methods571.43%
▷ Protected methods00.00%
▷ Private methods228.57%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 PNG files occupy 0.02MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png8.59KB3.45KB▼ 59.90%
assets/icon-256x256.png16.73KB6.11KB▼ 63.46%