84% highways-sync-for-intercom

Code Review | Highways Sync for Intercom

WordPress plugin Highways Sync for Intercom scored84%from 54 tests.

About plugin

  • Plugin page: highways-sync-for...
  • Plugin version: 1.1.6
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.7
  • WordPress version: 6.3.1
  • First release: Feb 23, 2020
  • Latest release: May 20, 2021
  • Number of updates: 21
  • Update frequency: every 21.6 days
  • Top authors: highways (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /1,584 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.49MB] [CPU: ▼2.48ms] Passed 4 tests

Analyzing server-side resources used by Highways Sync for Intercom
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.99 ▲0.5250.37 ▲12.99
Dashboard /wp-admin3.84 ▲0.4947.30 ▼12.32
Posts /wp-admin/edit.php3.89 ▲0.5349.76 ▲5.36
Add New Post /wp-admin/post-new.php6.36 ▲0.4782.08 ▼7.53
Media Library /wp-admin/upload.php3.70 ▲0.4742.36 ▲4.56
Intercom Sync /wp-admin/options-general.php?page=intercom-wp3.6535.96

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 378 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Highways Sync for Intercom
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.48 ▼0.081.78 ▼0.0142.62 ▲2.92
Dashboard /wp-admin2,210 ▲254.84 ▼0.03107.42 ▲5.5537.20 ▼5.60
Posts /wp-admin/edit.php2,093 ▲72.04 ▲0.0638.67 ▲2.5737.00 ▲3.53
Add New Post /wp-admin/post-new.php1,536 ▲1923.18 ▲5.59667.61 ▼11.1052.37 ▼4.27
Media Library /wp-admin/upload.php1,395 ▲74.14 ▼0.04108.82 ▲9.8446.85 ▲0.57
Intercom Sync /wp-admin/options-general.php?page=intercom-wp8792.0321.5924.89

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting 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 take a closer look at the following
  • 176× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      require(wp-content/plugins/highways-sync-for-intercom/includes/lib/intercom-php/vendor/clue/stream-filter/examples/../vendor/autoload.php): failed to open stream: No such file or directory in wp-content/plugins/highways-sync-for-intercom/includes/lib/intercom-php/vendor/clue/stream-filter/examples/uppercase.php on line 5
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/highways-sync-for-intercom/includes/lib/intercom-php/vendor/php-http/message/src/Encoding/FilteredStream.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Client\\Common\\Plugin' not found in wp-content/plugins/highways-sync-for-intercom/includes/lib/intercom-php/vendor/php-http/client-common/src/Plugin/RetryPlugin.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Authentication' not found in wp-content/plugins/highways-sync-for-intercom/includes/lib/intercom-php/vendor/php-http/message/src/Authentication/Wsse.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Client\\Common\\HttpClientRouterInterface' not found in wp-content/plugins/highways-sync-for-intercom/includes/lib/intercom-php/vendor/php-http/client-common/src/HttpClientRouter.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Authentication' not found in wp-content/plugins/highways-sync-for-intercom/includes/lib/intercom-php/vendor/php-http/message/src/Authentication/RequestConditional.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Discovery\\Exception\otFoundException' not found in wp-content/plugins/highways-sync-for-intercom/includes/lib/intercom-php/vendor/php-http/discovery/src/NotFoundException.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\Formatter' not found in wp-content/plugins/highways-sync-for-intercom/includes/lib/intercom-php/vendor/php-http/message/src/Formatter/SimpleFormatter.php:15
    • > PHP Fatal error
      Uncaught Error: Interface 'Http\\Message\\UriFactory' not found in wp-content/plugins/highways-sync-for-intercom/includes/lib/intercom-php/vendor/php-http/message/src/UriFactory/SlimUriFactory.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Http\\Client\\Common\\HttpClientPool\\HttpClientPool' not found in wp-content/plugins/highways-sync-for-intercom/includes/lib/intercom-php/vendor/php-http/client-common/src/HttpClientPool/LeastUsedClientPool.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

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
5 plugin tags: sync, crm, automation, intercom, email marketing

highways-sync-for-intercom/highways-sync-for-intercom.php 92% from 13 tests

The entry point to "Highways Sync for Intercom" version 1.1.6 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin22,479 lines of code in 348 files:
LanguageFilesBlank linesComment linesLines of code
PHP2914,4479,60615,897
Markdown311,89904,754
JSON22001,771
YAML15220
XML11018
Dockerfile18010
make1409

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity7.32
▷ Minimum class complexity1.00
▷ Maximum class complexity122.00
Average method complexity2.31
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces41
Interfaces42
Traits13
Classes216
▷ Abstract classes41.85%
▷ Concrete classes21298.15%
▷ Final classes9645.28%
Methods1,300
▷ Static methods1108.46%
▷ Public methods1,09183.92%
▷ Protected methods342.62%
▷ Private methods17513.46%
Functions213
▷ Named functions6329.58%
▷ Anonymous functions15070.42%
Constants72
▷ Global constants1013.89%
▷ Class constants6286.11%
▷ Public constants62100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
5 PNG files occupy 1.24MB with 0.64MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png549.12KB169.68KB▼ 69.10%
assets/icon-256x256.png4.83KB3.57KB▼ 26.15%
assets/icon-128x128.png2.42KB2.09KB▼ 13.87%
assets/screenshot-2.png301.62KB72.07KB▼ 76.11%
assets/screenshot-1.png411.09KB105.83KB▼ 74.26%