84% property-hive-stamp-duty-calculator

Code Review | Property Hive Stamp Duty Calculator

WordPress plugin Property Hive Stamp Duty Calculator scored84%from 54 tests.

About plugin

  • Plugin page: property-hive-sta...
  • Plugin version: 1.0.17
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 21, 2016
  • Latest release: Mar 2, 2023
  • Number of updates: 40
  • Update frequency: every 58.9 days
  • Top authors: PropertyHive (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

800+ active /9,899 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.88ms] Passed 4 tests

A check of server-side resources used by Property Hive Stamp Duty Calculator
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0437.50 ▼1.33
Dashboard /wp-admin3.34 ▼0.0143.13 ▼16.85
Posts /wp-admin/edit.php3.39 ▲0.0340.87 ▼5.80
Add New Post /wp-admin/post-new.php5.92 ▲0.0380.93 ▼14.65
Media Library /wp-admin/upload.php3.26 ▲0.0332.79 ▼2.20

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Property Hive Stamp Duty Calculator
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.23 ▼1.041.65 ▼0.1641.77 ▼4.67
Dashboard /wp-admin2,203 ▲216.01 ▲0.11101.72 ▼2.0141.68 ▼1.71
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0036.72 ▼2.3132.34 ▼2.46
Add New Post /wp-admin/post-new.php1,533 ▲1923.13 ▲5.52661.09 ▼45.2258.89 ▲6.16
Media Library /wp-admin/upload.php1,388 ▼34.22 ▲0.0397.59 ▼5.0045.48 ▲1.55

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 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 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
Please take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/property-hive-stamp-duty-calculator/templates/stamp-duty-calculator.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/property-hive-stamp-duty-calculator/templates/stamp-duty-calculator-wales.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/property-hive-stamp-duty-calculator/templates/stamp-duty-calculator-commercial.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/property-hive-stamp-duty-calculator/templates/stamp-duty-calculator-scotland.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
9 plugin tags: property hive, stamp duty calculator, propertyhive, estate agent, estate agents...

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

The primary PHP file in "Property Hive Stamp Duty Calculator" version 1.0.17 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("property-hive-stamp-duty-calculator.php" instead of "propertyhive-stamp-duty-calculator.php")

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 detected564 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript4486319
PHP58437225
CSS40020

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods10
▷ Static methods110.00%
▷ Public methods880.00%
▷ Protected methods00.00%
▷ Private methods220.00%
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

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-256x256.png16.45KB6.18KB▼ 62.44%
assets/icon-128x128.png8.51KB3.52KB▼ 58.63%