10% wp-real-estate

Code Review | WP Real Estate

WordPress plugin WP Real Estate scored10%from 54 tests.

About plugin

  • Plugin page: wp-real-estate
  • Plugin version: 1.1.8
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-5.9
  • WordPress version: 6.3.1
  • First release: Oct 9, 2017
  • Latest release: Jan 26, 2022
  • Number of updates: 21
  • Update frequency: every 74.8 days
  • Top authors: MyThemeShop (95.24%)roymahfooz (9.52%)

Code review

54 tests

User reviews

5 reviews

Install metrics

500+ active /25,271 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.

Server metrics [RAM: ▲2.63MB] [CPU: ▲24.46ms] Passed 4 tests

Analyzing server-side resources used by WP Real Estate
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /5.29 ▲1.8360.36 ▲22.29
Dashboard /wp-admin6.24 ▲2.9078.08 ▲11.46
Posts /wp-admin/edit.php6.22 ▲2.8673.55 ▲27.91
Add New Post /wp-admin/post-new.php9.00 ▲3.12131.56 ▲40.73
Media Library /wp-admin/upload.php6.15 ▲2.9368.85 ▲36.16
New Listing /wp-admin/post-new.php?post_type=listing6.7883.51
Listing Type /wp-admin/edit-tags.php?taxonomy=listing-type&post_type=listing6.3770.57
WRE Settings /wp-admin/edit.php?post_type=listing&page=wre_options6.8778.48
Enquiries /wp-admin/edit.php?post_type=listing-enquiry6.2063.24
Listings /wp-admin/edit.php?post_type=listing6.2265.84
Import IDX Listings /wp-admin/edit.php?post_type=listing&page=wre-idx-listing6.1258.03
Agents /wp-admin/users.php?role=wre_agent6.2859.82

Server storage [IO: ▲3.55MB] [DB: ▲0.01MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 516 new files
Database: no new tables, 16 new options
New WordPress options
wp_real_estate_activated
widget_recent-posts
wp_real_estate_notice_views
widget_wre-agents
widget_wre_widget
theysaidso_admin_options
wre_options
can_compress_scripts
widget_wre-search-listings
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Real Estate
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲12113.26 ▼1.421.85 ▲0.0342.67 ▼3.25
Dashboard /wp-admin2,281 ▲934.98 ▲0.0799.61 ▼13.3942.50 ▼1.50
Posts /wp-admin/edit.php2,160 ▲712.13 ▲0.0944.26 ▲2.5935.84 ▲1.06
Add New Post /wp-admin/post-new.php1,580 ▲4718.25 ▼5.23613.61 ▼80.0664.00 ▲10.36
Media Library /wp-admin/upload.php1,463 ▲754.34 ▲0.18103.13 ▼1.3443.41 ▼4.00
New Listing /wp-admin/post-new.php?post_type=listing3,3717.57154.0474.61
Listing Type /wp-admin/edit-tags.php?taxonomy=listing-type&post_type=listing1,7863.4450.1131.74
WRE Settings /wp-admin/edit.php?post_type=listing&page=wre_options3,4636.62138.0537.32
Enquiries /wp-admin/edit.php?post_type=listing-enquiry1,2302.0635.7433.79
Listings /wp-admin/edit.php?post_type=listing1,9882.2640.3937.48
Import IDX Listings /wp-admin/edit.php?post_type=listing&page=wre-idx-listing8621.8128.1527.33
Agents /wp-admin/users.php?role=wre_agent1,1862.2928.9232.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 16 options in the database
    • widget_recent-comments
    • listing-type_children
    • widget_wre-search-listings
    • wp_real_estate_activated
    • widget_wre_widget
    • db_upgraded
    • widget_wre-recent-listings
    • widget_wre-nearby-listings
    • wre_options
    • widget_theysaidso_widget
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 48× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Base' not found in wp-content/plugins/wp-real-estate/includes/libraries/cmb2/includes/types/CMB2_Type_Multi_Base.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wp-real-estate/includes/libraries/cmb2/includes/types/CMB2_Type_Oembed.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Hookup_Base' not found in wp-content/plugins/wp-real-estate/includes/libraries/cmb2/includes/CMB2_hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_hookup' not found in wp-content/plugins/wp-real-estate/includes/libraries/cmb2/includes/CMB2_Options_Hookup.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Radio' not found in wp-content/plugins/wp-real-estate/includes/libraries/cmb2/includes/types/CMB2_Type_Multicheck.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller' not found in wp-content/plugins/wp-real-estate/includes/libraries/cmb2/includes/rest-api/CMB2_REST_Controller_Boxes.php:17
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/wp-real-estate/includes/libraries/cmb2-taxonomy-master/includes/CMB2_Taxonomy.php on line 15
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Textarea' not found in wp-content/plugins/wp-real-estate/includes/libraries/cmb2/includes/types/CMB2_Type_Wysiwyg.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_REST_Controller_Boxes' not found in wp-content/plugins/wp-real-estate/includes/libraries/cmb2/includes/rest-api/CMB2_REST_Controller_Fields.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'CMB2_Type_Text' not found in wp-content/plugins/wp-real-estate/includes/libraries/cmb2/includes/types/CMB2_Type_Checkbox.php:13

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 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: No descriptions were found for these screenshots #1, #2, #3, #4, #5, #6, #7, #8, #9 in wp-real-estate/assets to your readme.txt
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

wp-real-estate/wp-real-estate.php Passed 13 tests

The main PHP file in "WP Real Estate" ver. 1.1.8 adds more information about the plugin and also serves as the entry point for this plugin
99 characters long description:
A Real Estate Listings plugin for WordPress. Create a smart real estate website quickly and easily.

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
No dangerous file extensions were detected62,674 lines of code in 336 files:
LanguageFilesBlank linesComment linesLines of code
PO File12013,78717,86831,575
PHP1574,3398,36516,112
CSS201,2141,2849,153
JavaScript157887244,225
Sass15291251,330
Markdown2520121
SVG364093
YAML193328
JSON20020
XML14217

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity19.30
▷ Minimum class complexity1.00
▷ Maximum class complexity182.00
Average method complexity3.40
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes107
▷ Abstract classes98.41%
▷ Concrete classes9891.59%
▷ Final classes11.02%
Methods813
▷ Static methods10212.55%
▷ Public methods68183.76%
▷ Protected methods10412.79%
▷ Private methods283.44%
Functions207
▷ Named functions19694.69%
▷ Anonymous functions115.31%
Constants19
▷ Global constants1263.16%
▷ Class constants736.84%
▷ Public constants7100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
15 compressed PNG files occupy 0.10MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/libraries/cmb2/images/ui-bg_glass_75_dadada_1x400.png0.11KB0.16KB0.00%
includes/libraries/cmb2/images/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
includes/libraries/cmb2/images/ui-icons_888888_256x240.png5.23KB4.11KB▼ 21.49%
includes/libraries/cmb2/images/ico-delete.png0.70KB0.72KB0.00%
includes/libraries/cmb2/images/ui-bg_flat_0_aaaaaa_40x100.png0.18KB0.08KB▼ 51.67%