78% realtycandy-idx-broker-extended

Code Review | RealtyCandy IDX Broker Extended

WordPress plugin RealtyCandy IDX Broker Extended scored 78% from 54 tests.

About plugin

  • Plugin page: realtycandy-idx-b...
  • Plugin version: 1.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.6.1
  • WordPress version: 6.3.1
  • First release: Apr 18, 2015
  • Latest release: Sep 29, 2016
  • Number of updates: 8
  • Update frequency: every 67.6 days
  • Top authors: redjim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,677 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▲0.91ms] Passed 4 tests

This is a short check of server-side resources used by RealtyCandy IDX Broker Extended
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0643.49 ▲0.22
Dashboard /wp-admin3.37 ▲0.0652.55 ▲0.06
Posts /wp-admin/edit.php3.42 ▲0.0655.08 ▲4.31
Add New Post /wp-admin/post-new.php5.97 ▲0.08101.19 ▼0.95
Media Library /wp-admin/upload.php3.29 ▲0.0652.03 ▲17.25
Widgets /wp-admin/admin.php?page=activate_widgets3.2632.79
Settings /wp-admin/admin.php?page=realtycandy_settings3.2747.47
Clear Wrapper Cache /wp-admin/admin.php?page=clear_dynamic_wrapper_options3.2635.48

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 38 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

RealtyCandy IDX Broker Extended: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲2013.42 ▼1.061.85 ▼0.1944.47 ▲1.46
Dashboard /wp-admin2,239 ▲365.01 ▼0.84105.85 ▲1.8377.14 ▲40.82
Posts /wp-admin/edit.php2,134 ▲452.08 ▲0.0740.16 ▲4.8937.38 ▲5.52
Add New Post /wp-admin/post-new.php1,557 ▲2419.49 ▼3.59822.46 ▲170.6553.65 ▼9.18
Media Library /wp-admin/upload.php1,433 ▲424.32 ▲0.10113.98 ▲10.3251.38 ▲8.23
Widgets /wp-admin/admin.php?page=activate_widgets8401.6925.3534.26
Settings /wp-admin/admin.php?page=realtycandy_settings9281.8924.2531.92
Clear Wrapper Cache /wp-admin/admin.php?page=clear_dynamic_wrapper_options8111.7327.3127.42

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/realtycandy-idx-broker-extended/idx/class.RC_Quicksearch_Widget.inc.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/realtycandy-idx-broker-extended/idx/class.RC_Omnibar_Widget.inc.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/realtycandy-idx-broker-extended/settings-content.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/realtycandy-idx-broker-extended/idx/featured-listing-scroller.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/realtycandy-idx-broker-extended/idx/class.RC_Lead_Login_Widget.inc.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/realtycandy-idx-broker-extended/idx/class.RC_Lead_Signup_Widget.inc.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/realtycandy-idx-broker-extended/idx/class.RC_City_Links_Widget.inc.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/realtycandy-idx-broker-extended/idx/init.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/realtycandy-idx-broker-extended/idx/class.RC_Idx_Widget.inc.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/realtycandy-idx-broker-extended/idx/class.RC_Showcase_Widget.inc.php:8

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=realtycandy_settings
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=realtycandy_settings 32:8 Uncaught SyntaxError: Invalid or unexpected token

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: equity, agent, idx, idx broker, genesis...

realtycandy-idx-broker-extended/realtycandy-idx-broker.php 92% from 13 tests

The main PHP script in "RealtyCandy IDX Broker Extended" version 1.5.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("realtycandy-idx-broker-extended.php" instead of "realtycandy-idx-broker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected3,580 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP163447702,266
JavaScript526521,135
CSS2799179

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity15.00
▷ Minimum class complexity3.00
▷ Maximum class complexity44.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods90
▷ Static methods00.00%
▷ Public methods90100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
12 PNG files occupy 0.13MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pixel_weave.png0.23KB0.24KB0.00%
images/idx-wrapper-menu.png57.61KB21.51KB▼ 62.66%
images/idx-dynamic-url.png21.49KB6.77KB▼ 68.49%
images/arrowdown.png0.17KB0.19KB0.00%
images/flyout-arrow-down.png0.23KB0.18KB▼ 20.68%