68% re-pro

Code Review | Real Estate Pro

WordPress plugin Real Estate Pro scored68%from 54 tests.

About plugin

  • Plugin page: re-pro
  • Plugin version: 1.0.9
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9
  • WordPress version: 6.3.1
  • First release: Oct 28, 2016
  • Latest release: Nov 20, 2017
  • Number of updates: 25
  • Update frequency: every 15.5 days
  • Top authors: sgarza (52%)bhubbard (52%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active /5,859 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▼1.55MB] [CPU: ▼48.69ms] Passed 4 tests

Server-side resources used by Real Estate Pro
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.44 ▼1.0210.61 ▼29.47
Dashboard /wp-admin2.46 ▼0.8412.10 ▼40.36
Posts /wp-admin/edit.php2.46 ▼0.8912.27 ▼41.21
Add New Post /wp-admin/post-new.php2.46 ▼3.4214.89 ▼83.70
Media Library /wp-admin/upload.php2.46 ▼0.7712.06 ▼27.51
Real Estate Pro /wp-admin/options-general.php?page=re-pro-settings2.4613.15

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 155 new files
Database: no new tables, 28 new options
New WordPress options
widget_homes_featured_listings
widget_homefinder_affiliate_search
widget_zillow_expensive_homes_widget
widget_homes_commute_time
widget_homes_simple_search
widget_recent-posts
widget_zillow_review_widget
db_upgraded
widget_homefinder_advertiser_directory
widget_zillow_newest_forsale_homes_widget
...

Browser metrics Passed 4 tests

This is an overview of browser requirements for Real Estate Pro
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲6013.61 ▼0.801.96 ▼0.0445.23 ▲1.63
Dashboard /wp-admin2,213 ▲224.85 ▼1.05103.64 ▲3.5143.40 ▼2.85
Posts /wp-admin/edit.php2,090 ▼22.00 ▼0.0436.70 ▼3.5937.68 ▼2.67
Add New Post /wp-admin/post-new.php1,536 ▲2223.12 ▲5.65646.51 ▼43.6955.61 ▼6.59
Media Library /wp-admin/upload.php1,395 ▲74.20 ▲0.0297.42 ▼9.6041.63 ▼6.47
Real Estate Pro /wp-admin/options-general.php?page=re-pro-settings8482.0324.6834.08

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin cannot be uninstalled
    • > Notice in wp-content/plugins/re-pro/modules/greatschools/widgets/widget-getschools.php+126
    Trying to access array offset on value of type bool
  • The uninstall procedure has failed, leaving 28 options in the database
    • widget_zillow_expensive_homes_widget
    • widget_theysaidso_widget
    • widget_rentbits_avg_rental_rates
    • widget_zillow_review_widget
    • widget_zillow_large_search_box
    • widget_homes_search
    • widget_homefinder_advertiser_directory
    • widget_recent-posts
    • widget_streetadvisor-details
    • widget_homes_featured_listings
    • ...

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=re-pro-settings
    • > Notice in wp-content/plugins/re-pro/modules/greatschools/widgets/widget-getschools.php+126
    Trying to access array offset on value of type bool

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 take a closer look at the following
  • 9× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/re-pro/settings.php:24
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/re-pro/modules/google-maps/maps-widget.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/re-pro/modules/realtor-com/widgets/class-realtor-widget.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/re-pro/modules/zillow/widgets/class-zillow-badges-widget.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_role() in wp-content/plugins/re-pro/modules/users/class-user-roles.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/re-pro/modules/equal-housing/widgets/class-equal-housing-widget.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/re-pro/modules/greatschools/widgets/widget-getschools.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/re-pro/modules/users/class-user-fields.php:62
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/re-pro/modules/equal-housing/widgets/class-equal-housing-widget.php:8

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Add descriptions for screenshots #1, #2, #3 in re-pro/assets to your readme.txt
  • Requires php: Invalid plugin version format
You can look at the official readme.txt

re-pro/re-pro.php 92% from 13 tests

The main PHP file in "Real Estate Pro" ver. 1.0.9 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Description: The description should be shorter than 140 characters (currently 143 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin4,668 lines of code in 81 files:
LanguageFilesBlank linesComment linesLines of code
PHP671,4203,3323,996
Sass1343242
CSS2380200
SVG40196
JavaScript45177
Markdown224053
YAML1004

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity10.73
▷ Minimum class complexity1.00
▷ Maximum class complexity37.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes51
▷ Abstract classes00.00%
▷ Concrete classes51100.00%
▷ Final classes00.00%
Methods293
▷ Static methods10.34%
▷ Public methods28496.93%
▷ Protected methods00.00%
▷ Private methods93.07%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
57 PNG files occupy 0.37MB with 0.19MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/greatschools/GS_Stars_3.png1.01KB0.68KB▼ 32.75%
assets/images/greatschools/94x94_GS_CityDistrict_Rating_Large_6.png3.83KB1.77KB▼ 53.94%
assets/images/icon-256x256.png7.00KB4.47KB▼ 36.08%
assets/images/greatschools/94x94_GS_CityDistrict_Rating_Large_3.png3.90KB1.74KB▼ 55.46%
assets/images/greatschools/20x20_GS_School_Rating_Small_4.png1.45KB0.37KB▼ 74.38%