51% essential-real-estate

Code Review | Essential Real Estate

WordPress plugin Essential Real Estate scored51%from 54 tests.

About plugin

  • Plugin page: essential-real-es...
  • Plugin version: 4.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-6.4.1
  • WordPress version: 6.3.1
  • First release: Feb 25, 2017
  • Latest release: Nov 30, 2023
  • Number of updates: 789
  • Update frequency: every 3.1 days
  • Top authors: g5theme (100%)

Code review

54 tests

User reviews

47 reviews

Install metrics

10,000+ active /469,628 total downloads

Benchmarks

Plugin footprint 64% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲7.23MB] [CPU: ▲56.22ms] 50% from 4 tests

A check of server-side resources used by Essential Real Estate
It is recommended to improve the following
  • RAM: You should keep total memory usage under 10MB (currently 14.68MB on /wp-admin/post-new.php?post_type=agent)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 7.23MB on /wp-admin/edit.php?post_type=package)
PageMemory (MB)CPU Time (ms)
Home /13.88 ▲10.4286.13 ▲45.67
Dashboard /wp-admin9.37 ▲6.0793.30 ▲43.00
Posts /wp-admin/edit.php9.79 ▲6.43133.32 ▲84.33
Add New Post /wp-admin/post-new.php16.23 ▲10.34201.13 ▲77.00
Media Library /wp-admin/upload.php9.33 ▲6.1090.75 ▲59.21
Property Status /wp-admin/edit-tags.php?taxonomy=property-status&post_type=property9.5389.68
Add New /wp-admin/post-new.php?post_type=package9.94143.55
Welcome /wp-admin/admin.php?page=ere_welcome9.2475.38
Property Feature /wp-admin/edit-tags.php?taxonomy=property-feature&post_type=property9.4189.48
Agency /wp-admin/edit-tags.php?taxonomy=agency&post_type=agent14.6389.43
Fonts Management /wp-admin/admin.php?page=g5core_fonts_management9.2776.03
Add New /wp-admin/post-new.php?post_type=property14.94217.64
Property Type /wp-admin/edit-tags.php?taxonomy=property-type&post_type=property9.5184.90
Add New /wp-admin/post-new.php?post_type=agent14.68157.53
All Packages /wp-admin/edit.php?post_type=package9.67105.37

Server storage [IO: ▲15.47MB] [DB: ▲0.05MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 1,177 new files
Database: 1 new table, 17 new options
New tables
wp_ere_save_search
New WordPress options
widget_ere_widget_recent_properties
can_compress_scripts
widget_theysaidso_widget
ere_options
ere_version
widget_recent-posts
widget_ere_widget_featured_properties
theysaidso_admin_options
widget_ere_widget_mortgage_calculator
widget_ere_widget_top_agents
...

Browser metrics 75% from 4 tests

This is an overview of browser requirements for Essential Real Estate
Please improve the following
  • Nodes: Limit the number of DOM nodes under 25,000 (currently 33,193 on /wp-admin/admin.php?page=g5core_fonts_management)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,204 ▲44215.58 ▲1.3142.95 ▲41.3042.83 ▼1.71
Dashboard /wp-admin2,396 ▲2155.62 ▼0.0693.61 ▼20.4746.37 ▼1.46
Posts /wp-admin/edit.php7,715 ▲5,6152.42 ▲0.4656.10 ▲18.2134.58 ▲2.37
Add New Post /wp-admin/post-new.php6,999 ▲5,47023.14 ▲0.28706.41 ▲131.6937.98 ▼12.26
Media Library /wp-admin/upload.php1,601 ▲1984.14 ▼0.01107.93 ▲10.6047.41 ▲3.01
Property Status /wp-admin/edit-tags.php?taxonomy=property-status&post_type=property1,9193.5267.0841.60
Add New /wp-admin/post-new.php?post_type=package7,7274.68104.0640.57
Welcome /wp-admin/admin.php?page=ere_welcome1,4199.16284.7766.98
Property Feature /wp-admin/edit-tags.php?taxonomy=property-feature&post_type=property1,4762.2830.0628.76
Agency /wp-admin/edit-tags.php?taxonomy=agency&post_type=agent2,92310.53250.9290.12
Fonts Management /wp-admin/admin.php?page=g5core_fonts_management33,1936.54109.5893.60
Add New /wp-admin/post-new.php?post_type=property12,11610.75299.2485.50
Property Type /wp-admin/edit-tags.php?taxonomy=property-type&post_type=property1,7883.4944.7336.34
Add New /wp-admin/post-new.php?post_type=agent9,19510.01258.8174.80
All Packages /wp-admin/edit.php?post_type=package6,7152.5049.0427.81

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables were found after uninstall: 1 table
    • wp_ere_save_search
  • The uninstall procedure has failed, leaving 17 options in the database
    • widget_ere_widget_login_menu
    • theysaidso_admin_options
    • widget_ere_widget_my_package
    • widget_ere_widget_top_agents
    • widget_recent-comments
    • widget_ere_widget_listing_property_taxonomy
    • db_upgraded
    • ere_options
    • widget_ere_widget_search_form
    • ere_version
    • ...

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 22× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/essential-real-estate/lib/smart-framework/init.php
    • > /wp-content/plugins/essential-real-estate/lib/smart-framework/inc/content-inject.class.php
    • > /wp-content/plugins/essential-real-estate/includes/functions/property.php
    • > /wp-content/plugins/essential-real-estate/lib/smart-framework/admin/templates/meta-end.php
    • > /wp-content/plugins/essential-real-estate/public/partials/payment/stripe-php/build.php
    • > /wp-content/plugins/essential-real-estate/includes/ere-formatting-functions.php
    • > /wp-content/plugins/essential-real-estate/public/templates/loop/property-title.php
    • > /wp-content/plugins/essential-real-estate/public/templates/loop/property-location.php
    • > /wp-content/plugins/essential-real-estate/lib/smart-framework/core/fonts/fonts.class.php
    • > /wp-content/plugins/essential-real-estate/lib/smart-framework/core/icons-popup/templates/icons-svg.tpl.php
  • 110× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/essential-real-estate/public/partials/payment/stripe-php/tests/BankAccountTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit_Framework_TestCase' not found in wp-content/plugins/essential-real-estate/public/partials/payment/stripe-php/tests/TestCase.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\Error\\Base' not found in wp-content/plugins/essential-real-estate/public/partials/payment/stripe-php/lib/Error/Api.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/essential-real-estate/includes/widgets/acf/templates/image.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'Stripe\\JsonSerializable' not found in wp-content/plugins/essential-real-estate/public/partials/payment/stripe-php/lib/StripeObject.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/essential-real-estate/public/partials/payment/stripe-php/tests/TokenTest.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/essential-real-estate/lib/smart-framework/admin/templates/theme-options-end.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/essential-real-estate/public/partials/payment/stripe-php/tests/CollectionTest.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\ApiResource' not found in wp-content/plugins/essential-real-estate/public/partials/payment/stripe-php/lib/ApplicationFee.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'Stripe\\TestCase' not found in wp-content/plugins/essential-real-estate/public/partials/payment/stripe-php/tests/PlanTest.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property-status&post_type=property
    • > Javascript (severe) in unknown
    /wp-admin/edit-tags.php?taxonomy=property-status&post_type=property 55:7 Uncaught SyntaxError: Invalid or unexpected token
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=property
    • > Console-api (warning) in unknown
    http://maps.googleapis.com/maps/api/js?libraries=places&language=en_US&key=AIzaSyBqmFdSPp4-iY_BG14j_eUeLwOn9Oj4a4Q&ver=6.3.1 240:51 "Google Maps JavaScript API has been loaded directly without a callback. This is not supported and can lead to race conditions and suboptimal performance. For supported loading patterns please see https://goo.gle/js-api-loading"
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-tags.php?taxonomy=agency&post_type=agent
    • > Console-api (severe) in unknown
    http://maps.googleapis.com/maps/api/js?libraries=places&language=en_US&key=AIzaSyBqmFdSPp4-iY_BG14j_eUeLwOn9Oj4a4Q&ver=6.3.1 158:248 "Google Maps JavaScript API error: ExpiredKeyMapError\nhttps://developers.google.com/maps/documentation/javascript/error-messages#expired-key-map-error"
    • > GET request to /wp-admin/edit-tags.php?taxonomy=property-type&post_type=property
    • > Javascript (severe) in unknown
    /wp-admin/edit-tags.php?taxonomy=property-type&post_type=property 55:7 Uncaught SyntaxError: Invalid or unexpected token

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === essential-real-estate === )
You can take inspiration from this readme.txt

essential-real-estate/essential-real-estate.php 92% from 13 tests

This is the main PHP file of "Essential Real Estate" version 4.3.4, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 289 characters long)

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Please make sure to remedy the following
  • For security reasons, never distribute binary or executable files with your plugin
    • .crt - Security Certificate in Firefox, IE, Chrome, Safari
      • wp-content/plugins/essential-real-estate/public/partials/payment/stripe-php/data/ca-certificates.crt
218,700 lines of code in 990 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript31424,15411,05966,892
PHP4274,0955,69751,596
CSS1652,46452434,225
JSON20033,760
PO File46,72912,38315,172
LESS18586817,506
Sass5056365,559
SVG3003,001
Markdown34260912
XML30054
HTML12023

PHP code Passed 2 tests

Analyzing 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.42
Average class complexity14.79
▷ Minimum class complexity1.00
▷ Maximum class complexity216.00
Average method complexity3.41
▷ Minimum method complexity1.00
▷ Maximum method complexity99.00
Code structure
Namespaces4
Interfaces3
Traits0
Classes232
▷ Abstract classes114.74%
▷ Concrete classes22195.26%
▷ Final classes10.45%
Methods1,341
▷ Static methods21215.81%
▷ Public methods1,20289.63%
▷ Protected methods413.06%
▷ Private methods987.31%
Functions82
▷ Named functions7996.34%
▷ Anonymous functions33.66%
Constants18
▷ Global constants1477.78%
▷ Class constants422.22%
▷ Public constants4100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
134 PNG files occupy 0.49MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/nearby-places/Pharmacy.png3.52KB2.03KB▼ 42.34%
public/assets/packages/jquery-ui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.32KB0.18KB▼ 42.38%
admin/assets/images/nearby-places/Place_of_worship.png3.46KB2.02KB▼ 41.73%
public/assets/packages/jquery-ui/images/ui-icons_555555_256x240.png6.91KB4.18KB▼ 39.47%
admin/assets/images/nearby-places/University.png3.45KB2.00KB▼ 42.24%