10% wprealestate

Code Review | WP Real Estate

WordPress plugin WP Real Estate scored10%from 54 tests.

About plugin

  • Plugin page: wprealestate
  • Plugin version: 5.5.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.5.1
  • WordPress version: 6.3.1
  • First release: May 13, 2013
  • Latest release: Sep 14, 2020
  • Number of updates: 80
  • Update frequency: every 33.7 days
  • Top authors: hozyali (93.75%)99robots (7.5%)

Code review

54 tests

User reviews

14 reviews

Install metrics

60+ active /33,984 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wprealestate/wprealestate.php+146
    Methods with the same name as their class will not be constructors in a future version of PHP; SearchWidget has a deprecated constructor

Server metrics [RAM: ▼1.82MB] [CPU: ▼49.73ms] Passed 4 tests

A check of server-side resources used by WP Real Estate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.304.72 ▼30.12
Dashboard /wp-admin2.19 ▼1.126.05 ▼40.87
Posts /wp-admin/edit.php2.19 ▼1.175.73 ▼40.93
Add New Post /wp-admin/post-new.php2.19 ▼3.706.35 ▼87.00
Media Library /wp-admin/upload.php2.19 ▼1.046.53 ▼28.37
State /wp-admin/edit-tags.php?taxonomy=state&post_type=property2.195.87
WP Real Estate /wp-admin/admin.php?page=WPRealEstateHome2.196.28
Property Type /wp-admin/admin.php?page=WPRealEstatePropertyType2.196.77
Settings /wp-admin/admin.php?page=WPRealEstateSettings2.195.98
All Properties /wp-admin/edit.php?post_type=property2.196.07
Facility /wp-admin/edit-tags.php?taxonomy=facility&post_type=property2.194.88
Add New /wp-admin/post-new.php?post_type=property2.196.61

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 77 new files
Database: no new tables, 15 new options
New WordPress options
widget_recent-posts
p_detail_sidebar
p_share_buttons
p_list_sidebar
widget_theysaidso_widget
et_re_property_type
ET_RE_Currency
et_re_adv_flds
theysaidso_admin_options
p_num_slider_pics
...

Browser metrics Passed 4 tests

A check of browser resources used by WP Real Estate
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,950 ▲16413.74 ▼0.628.39 ▲6.6343.80 ▲3.87
Dashboard /wp-admin2,265 ▲855.58 ▼0.0681.92 ▼7.2637.77 ▼0.99
Posts /wp-admin/edit.php2,173 ▲762.02 ▼0.0536.24 ▼1.1831.29 ▼0.93
Add New Post /wp-admin/post-new.php1,596 ▲6818.31 ▼4.77683.71 ▲12.0171.16 ▲11.40
Media Library /wp-admin/upload.php1,476 ▲764.22 ▼0.0595.94 ▼16.2444.46 ▼3.03
State /wp-admin/edit-tags.php?taxonomy=state&post_type=property1,3162.1426.0029.20
WP Real Estate /wp-admin/admin.php?page=WPRealEstateHome1,0672.0124.7245.33
Property Type /wp-admin/admin.php?page=WPRealEstatePropertyType8781.6625.7924.20
Settings /wp-admin/admin.php?page=WPRealEstateSettings1,2711.6823.8142.78
All Properties /wp-admin/edit.php?post_type=property1,2041.9233.1030.57
Facility /wp-admin/edit-tags.php?taxonomy=facility&post_type=property1,3162.1627.1425.51
Add New /wp-admin/post-new.php?post_type=property3,6887.53186.5669.45

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/wprealestate/wprealestate.php+146
    Methods with the same name as their class will not be constructors in a future version of PHP; SearchWidget has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 15 options
    • et_re_pp_listing
    • can_compress_scripts
    • p_detail_sidebar
    • widget_theysaidso_widget
    • p_list_sidebar
    • widget_recent-posts
    • p_num_slider_pics
    • et_re_property_type
    • ET_RE_Currency
    • et_re_wg_bg_color
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Smoke test failed, please fix the following
  • 8 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=property
    • > Deprecated in wp-content/plugins/wprealestate/wprealestate.php+146
    Methods with the same name as their class will not be constructors in a future version of PHP; SearchWidget has a deprecated constructor

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/wprealestate/wprealestate.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wprealestate/functions.php:41
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wprealestate/adm_pro_custom_details.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wprealestate/et_re_home.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wprealestate/shrtcd_property_list_filter.php:92
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wprealestate/wprealestate_vars.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_localize_script() in wp-content/plugins/wprealestate/wp_localize_script.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wprealestate/library/property-images-metabox.php:22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wprealestate/tpl_property_view.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wprealestate/et_er_property_type.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/post-new.php?post_type=property
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: $(...).live is not a function" "TypeError: $(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wprealestate/library/js/get-images.js?ver=6.3.1:21:26)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/post-new.php?post_type=property
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: $(...).live is not a function

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
Attributes that require attention:
  • Screenshots: A description for screenshot #3 is required in wprealestate/assets to your readme.txt
You can look at the official readme.txt

wprealestate/wprealestate.php Passed 13 tests

The main file in "WP Real Estate" v. 5.5.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
29 characters long description:
Real estate property listing.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected25,088 lines of code in 38 files:
LanguageFilesBlank linesComment linesLines of code
CSS71,074738,045
SVG5007,319
HTML256103,988
PHP145161232,260
JavaScript66614462,231
PO File45151,0511,245

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions39
▷ Named functions39100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
12 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bed.png1.13KB0.47KB▼ 58.08%
images/bg_direction_nav.png1.82KB0.79KB▼ 56.38%
images/deleteicon.png1.09KB0.43KB▼ 60.75%
images/no_property_image.png12.05KB3.84KB▼ 68.12%
images/bath.png1.17KB0.55KB▼ 52.92%