82% spatialmatch-free-lifestyle-search

Code Review | SpatialMatch IDX

WordPress plugin SpatialMatch IDX scored82%from 54 tests.

About plugin

  • Plugin page: spatialmatch-free...
  • Plugin version: 3.0.9
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Nov 26, 2012
  • Latest release: Mar 29, 2023
  • Number of updates: 145
  • Update frequency: every 26.1 days
  • Top authors: homejunction (84.14%)grantgould (16.55%)

Code review

54 tests

User reviews

8 reviews

Install metrics

200+ active /16,376 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.54MB] [CPU: ▼3.39ms] 75% from 4 tests

Server-side resources used by SpatialMatch IDX
Please take the time to fix the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 711.27ms on /wp-admin/admin.php?page=hji-spatialmatch-idx)
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3840.89 ▲0.07
Dashboard /wp-admin3.90 ▲0.6047.13 ▲1.23
Posts /wp-admin/edit.php3.95 ▲0.5948.49 ▼2.03
Add New Post /wp-admin/post-new.php6.49 ▲0.5983.00 ▼12.83
Media Library /wp-admin/upload.php3.83 ▲0.5941.40 ▲6.10
Leads /wp-admin/admin.php?page=hji-spatialmatch-idx-leads4.841,060.90
Settings /wp-admin/admin.php?page=hji-spatialmatch-idx4.86711.27
Help /wp-admin/admin.php?page=hji-spatialmatch-idx-help3.8639.56

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 309 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by SpatialMatch IDX
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲11114.48 ▲0.191.81 ▼0.2139.96 ▼4.42
Dashboard /wp-admin2,263 ▲755.86 ▲0.98113.48 ▼3.5474.07 ▲27.63
Posts /wp-admin/edit.php2,145 ▲532.02 ▼0.0237.17 ▼2.1132.65 ▼7.24
Add New Post /wp-admin/post-new.php1,570 ▲5123.12 ▼0.33738.54 ▲50.4760.98 ▲6.41
Media Library /wp-admin/upload.php1,448 ▲604.22 ▼0.0098.38 ▼1.1950.00 ▲5.38
Leads /wp-admin/admin.php?page=hji-spatialmatch-idx-leads1,8264.5166.6581.24
Settings /wp-admin/admin.php?page=hji-spatialmatch-idx1,2793.9851.0783.64
Help /wp-admin/admin.php?page=hji-spatialmatch-idx-help1,3213.7947.0276.58

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
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 129× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'SpatialMatchIdx\\admin\\actions\\BaseAction' not found in wp-content/plugins/spatialmatch-free-lifestyle-search/src/admin/actions/pages/licenseRegistrations/TrialLicenseRegistrationShowAction.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'SpatialMatchIdx\\core\\actions\\interfaces\\ActionInterface' not found in wp-content/plugins/spatialmatch-free-lifestyle-search/src/admin/actions/tabs/compliance/ComplianceShowAction.php:11
    • > PHP Fatal error
      Cannot declare class ArithmeticError, because the name is already in use in wp-content/plugins/spatialmatch-free-lifestyle-search/vendor/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php on line 3
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/spatialmatch-free-lifestyle-search/vendor/guzzlehttp/guzzle/src/Exception/BadResponseException.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/spatialmatch-free-lifestyle-search/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'SpatialMatchIdx\\admin\\actions\\BaseAjaxAction' not found in wp-content/plugins/spatialmatch-free-lifestyle-search/src/admin/actions/ajax/DeleteFavoritesAction.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'SpatialMatchIdx\\admin\\actions\\BaseAction' not found in wp-content/plugins/spatialmatch-free-lifestyle-search/src/admin/actions/tabs/license/LicenseSaveAction.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Exception\\GuzzleException' not found in wp-content/plugins/spatialmatch-free-lifestyle-search/vendor/guzzlehttp/guzzle/src/Exception/InvalidArgumentException.php:5
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromiseInterface' not found in wp-content/plugins/spatialmatch-free-lifestyle-search/vendor/guzzlehttp/promises/src/RejectedPromise.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'SpatialMatchIdx\\admin\\actions\\BaseAction' not found in wp-content/plugins/spatialmatch-free-lifestyle-search/src/admin/actions/pages/leads/detail/LeadFormEntreiesShowAction.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 80% from 29 tests

readme.txt 94% 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
Attributes that need to be fixed:
  • Tags: There are too many tags (11 tag instead of maximum 10)
You can look at the official readme.txt

spatialmatch-free-lifestyle-search/SpatialMatch.php 62% from 13 tests

The main PHP file in "SpatialMatch IDX" ver. 3.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: Please keep the plugin description shorter than 140 characters (currently 233 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("spatialmatch-free-lifestyle-search.php" instead of "SpatialMatch.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Requires at least: Required version must be the same as the one declared in readme.txt ("5.0" instead of "5.0.0")
  • Requires PHP: Required version must be the same as the one declared in readme.txt ("7.4" instead of "7.4.0")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin38,553 lines of code in 290 files:
LanguageFilesBlank linesComment linesLines of code
PHP2754,3107,39136,800
JSON2001,539
SVG200166
XML10019
Dockerfile18010
make1409
JavaScript4174
Bourne Shell1203
CSS3033

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
The following items need your attention
  • Method cyclomatic complexity should be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity11.93
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces47
Interfaces21
Traits3
Classes190
▷ Abstract classes31.58%
▷ Concrete classes18798.42%
▷ Final classes2412.83%
Methods1,217
▷ Static methods21617.75%
▷ Public methods97680.20%
▷ Protected methods322.63%
▷ Private methods20917.17%
Functions169
▷ Named functions7644.97%
▷ Anonymous functions9355.03%
Constants183
▷ Global constants4524.59%
▷ Class constants13875.41%
▷ Public constants138100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/admin-menu.png0.31KB0.22KB▼ 28.80%
assets/img/logo.png14.31KB5.57KB▼ 61.05%
assets/img/logo-white.png4.61KB4.69KB0.00%