71% kvcore-idx

Code Review | kvCORE IDX

WordPress plugin kvCORE IDX scored71%from 54 tests.

About plugin

  • Plugin page: kvcore-idx
  • Plugin version: 2.3.28
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.7
  • WordPress version: 6.3.1
  • First release: Aug 15, 2018
  • Latest release: Nov 2, 2023
  • Number of updates: 220
  • Update frequency: every 8.7 days
  • Top authors: insiderealestate (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /31,497 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.98MB] [CPU: ▲2.54ms] 75% from 4 tests

This is a short check of server-side resources used by kvCORE IDX
Please fix the following
  • RAM: Total memory usage should be kept under 10MB (currently 10.38MB on /wp-admin/admin.php?page=kvcoreidx_settings)
PageMemory (MB)CPU Time (ms)
Home /5.08 ▲1.62280.14 ▲237.99
Dashboard /wp-admin6.30 ▲2.9963.11 ▲17.16
Posts /wp-admin/edit.php6.35 ▲2.9958.25 ▲14.37
Add New Post /wp-admin/post-new.php6.22 ▲0.3352.01 ▼40.17
Media Library /wp-admin/upload.php6.22 ▲2.9954.63 ▲18.79
kvCORE IDX Settings /wp-admin/admin.php?page=kvcoreidx_settings10.38491.44

Server storage [IO: ▲7.53MB] [DB: ▲0.00MB] 67% from 3 tests

Analyzing filesystem and database footprints of this plugin
Please fix the following
  • There were 1 file (0.00KB) illegally modified outside of "wp-content/plugins/kvcore-idx/" and "wp-content/uploads/"
    • (new file) wp-content/cache/kvcoreidx/.empty
Filesystem: 645 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
kvcoreidx_flush_rewrite_rules
db_upgraded
widget_kvcoreidx_login
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
kvcore_idx_version

Browser metrics Passed 4 tests

This is an overview of browser requirements for kvCORE IDX
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,073 ▲31218.02 ▲3.63181.04 ▲179.3176.41 ▲33.42
Dashboard /wp-admin2,316 ▲1365.66 ▼0.0181.52 ▼13.8636.42 ▼3.82
Posts /wp-admin/edit.php2,224 ▲1272.00 ▼0.0337.39 ▼1.2730.40 ▼5.47
Add New Post /wp-admin/post-new.php1,547 ▲2118.05 ▼5.00589.78 ▼74.1468.93 ▲12.58
Media Library /wp-admin/upload.php1,520 ▲1204.24 ▲0.03101.25 ▼5.1943.53 ▼2.65
kvCORE IDX Settings /wp-admin/admin.php?page=kvcoreidx_settings1,7173.1760.4661.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • kvcore_idx_version
    • kvcoreidx_flush_rewrite_rules
    • widget_kvcoreidx_login
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=kvcoreidx_settings
    • > Notice in wp-content/plugins/kvcore-idx/includes/kvcore/data-store/class-area-page.php+160
    Undefined index: api_url
    • > GET request to /wp-admin/admin.php?page=kvcoreidx_settings
    • > Notice in wp-content/plugins/kvcore-idx/includes/kvcore/data-store/class-area-page.php+161
    Undefined index: authorization_token
    • > GET request to /wp-admin/admin.php?page=kvcoreidx_settings
    • > Error in wp-content/plugins/kvcore-idx/includes/kvcore/data-store/class-area-page.php+180
    Uncaught TypeError: json_decode() expects parameter 1 to be string, bool given in wp-content/plugins/kvcore-idx/includes/kvcore/data-store/class-area-page.php:180
    Stack trace:
    #0 wp-content/plugins/kvcore-idx/includes/kvcore/data-store/class-area-page.php(180): json_decode()
    #1 wp-content/plugins/kvcore-idx/includes/kvcore/data-store/class-area-page.php(70): kvCORE\Data_Store\Area_Page::get_list_from_remote()
    #2 wp-content/plugins/kvcore-idx/includes/kvcore/rest/v1/class-area-page.php(43): kvCORE\Data_Store\Area_Page::get_list()
    #3 wp-content/plugins/kvcore-idx/includes/kvcore/rest/v1/class-area-page.php(22): kvCORE\Rest\v1\Area_Page->get()
    #4 wp-content/plugins/kvcore-idx/includes/kvcore/class-rest.php(43): kvCORE\Rest\v1\Area_Page->callback()
    #5 wp-includes/rest-api/class-wp-rest-server.php(1188): kvCORE\Rest->kvCORE\{closure}()
    #6 wp-includes/rest-api/class

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 items
  • 552× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/kvcore-idx/includes/vendor/twig/twig/src/Node/DoNode.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'kvCORE_AdminPageFramework_PageLoadInfo_Base' not found in wp-content/plugins/kvcore-idx/includes/lib/admin-page-framework/factory/network_admin_page/_view/AdminPageFramework_PageLoadInfo_network_admin_page.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/kvcore-idx/includes/vendor/twig/twig/src/Node/ModuleNode.php:31
    • > PHP Fatal error
      Uncaught Error: Class 'kvCORE_AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/kvcore-idx/includes/lib/admin-page-framework/factory/admin_page/_model/delegate/AdminPageFramework_Model__FormRedirectHandler.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'kvCORE_AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/kvcore-idx/includes/lib/admin-page-framework/factory/admin_page/_view/AdminPageFramework_View__PageMetaboxEnabler.php:7
    • > PHP Warning
      include(): Failed opening 'vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/kvcore-idx/includes/vendor/hybridauth/hybridauth/examples/example_06/callback.php on line 6
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\Binary\\AbstractBinary' not found in wp-content/plugins/kvcore-idx/includes/vendor/twig/twig/src/Node/Expression/Binary/GreaterEqualBinary.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'kvCORE\\Shortcode\\Listing_Detail\\Details' not found in wp-content/plugins/kvcore-idx/includes/kvcore/shortcode/listing-detail/details/class-similar-properties.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ScssPhp\\ScssPhp\\Block' not found in wp-content/plugins/kvcore-idx/includes/vendor/scssphp/scssphp/src/Block/ForBlock.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'kvCORE_AdminPageFramework' not found in wp-content/plugins/kvcore-idx/includes/kvcore/admin/class-page.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=kvcoreidx_settings
    • > Network (severe)
    index.php/wp-json/kvcoreidx/v1/admin/area-page/list - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration 90% 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
These attributes need your attention:
  • Contributors: Contributors not specified
You can look at the official readme.txt

kvcore-idx/kvcore-idx.php 85% from 13 tests

The main file in "kvCORE IDX" v. 2.3.28 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Requires PHP: The required version number must match the one declared in readme.txt ("7.1.3" instead of "7.0")
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist

Code Analysis 95% from 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 detected106,636 lines of code in 1,255 files:
LanguageFilesBlank linesComment linesLines of code
PHP86312,29419,18961,376
JavaScript1655,5781,68023,401
Sass701,4671107,902
Twig94396936,507
JSON11005,591
CSS107736670
Markdown212730645
YAML57129295
SVG1006165
Bourne Shell2271753
XML21520
reStructuredText18510
HTML1001

PHP code 0% from 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
The following items need your attention
  • Cyclomatic complexity of classes has to be reduced to less than 1000 (currently 1,484)
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 198)
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.01
▷ Minimum class complexity1.00
▷ Maximum class complexity1,484.00
Average method complexity3.12
▷ Minimum method complexity1.00
▷ Maximum method complexity198.00
Code structure
Namespaces73
Interfaces24
Traits2
Classes912
▷ Abstract classes11212.28%
▷ Concrete classes80087.72%
▷ Final classes637.88%
Methods3,977
▷ Static methods48112.09%
▷ Public methods2,41860.80%
▷ Protected methods85121.40%
▷ Private methods70817.80%
Functions236
▷ Named functions16168.22%
▷ Anonymous functions7531.78%
Constants206
▷ Global constants2512.14%
▷ Class constants18187.86%
▷ Public constants17898.34%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
24 PNG files occupy 4.04MB with 2.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
public/images/Polygon-2.png0.25KB0.23KB▼ 7.17%
assets/screenshot-1.png124.89KB43.08KB▼ 65.51%
public/images/cat-img.png123.61KB43.12KB▼ 65.11%
public/images/cat-img4.png192.25KB55.33KB▼ 71.22%
admin/images/listing-detail-design-v2.png637.44KB207.79KB▼ 67.40%