77% realtycandy-mailchimp-idx-broker-connector

Code Review | RealtyCandy MailChimp IDX Broker Connector

WordPress plugin RealtyCandy MailChimp IDX Broker Connector scored77%from 54 tests.

About plugin

  • Plugin page: realtycandy-mailc...
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.6
  • WordPress version: 6.3.1
  • First release: Oct 7, 2016
  • Latest release: Oct 8, 2016
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: redjim (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /795 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

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

Analyzing server-side resources used by RealtyCandy MailChimp IDX Broker Connector
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 536.49ms on /wp-admin/admin.php?page=settings-mailchimp-idx)
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0338.41 ▼4.59
Dashboard /wp-admin3.34 ▲0.0455.40 ▲4.73
Posts /wp-admin/edit.php3.46 ▲0.1052.77 ▲2.05
Add New Post /wp-admin/post-new.php5.94 ▲0.0684.88 ▼20.72
Media Library /wp-admin/upload.php3.27 ▲0.0439.65 ▲2.49
Settings /wp-admin/admin.php?page=settings-mailchimp-idx3.31536.49
Mailchimp IDX /wp-admin/admin.php?page=mailchimp-idx3.28370.70

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

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

Browser metrics Passed 4 tests

A check of browser resources used by RealtyCandy MailChimp IDX Broker Connector
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲10014.74 ▲0.172.28 ▲0.6642.67 ▲0.34
Dashboard /wp-admin2,230 ▲535.66 ▲0.0688.32 ▲2.6739.17 ▼6.76
Posts /wp-admin/edit.php2,132 ▲322.06 ▲0.0641.86 ▼0.5835.58 ▼4.16
Add New Post /wp-admin/post-new.php1,553 ▲2423.39 ▲0.56639.85 ▲5.9156.18 ▼0.02
Media Library /wp-admin/upload.php1,435 ▲384.27 ▲0.06106.07 ▲5.3144.44 ▲2.95
Settings /wp-admin/admin.php?page=settings-mailchimp-idx9862.0630.9766.30
Mailchimp IDX /wp-admin/admin.php?page=mailchimp-idx1,1692.3647.4433.06

Uninstaller [IO: ▲0.00MB] [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
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/realtycandy-mailchimp-idx-broker-connector/bootstrap.php
    • > /wp-content/plugins/realtycandy-mailchimp-idx-broker-connector/views/idxaddons-mailchimp-setting/page-settings-fields.php
  • 31× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Warning
      require_once(WP_PLUGIN_DIR/simpletest-for-wordpress/WpSimpleTest.php): failed to open stream: No such file or directory in wp-content/plugins/realtycandy-mailchimp-idx-broker-connector/tests/unit/unit-test-wpps-settings.php on line 3
    • > PHP Notice
      Undefined variable: section in wp-content/plugins/realtycandy-mailchimp-idx-broker-connector/views/idxaddons-mailchimp-setting/page-settings-section-headers.php on line 6
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/realtycandy-mailchimp-idx-broker-connector/tests/unit/unit-test-wpps-settings.php on line 3
    • > PHP Warning
      require_once(WP_PLUGIN_DIR/simpletest-for-wordpress/WpSimpleTest.php): failed to open stream: No such file or directory in wp-content/plugins/realtycandy-mailchimp-idx-broker-connector/tests/unit/unit-test-wpps-instance-class.php on line 3
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/realtycandy-mailchimp-idx-broker-connector/views/idxaddons-mailchimp-setting/page-settings-fields.php on line 9
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/realtycandy-mailchimp-idx-broker-connector/views/idxaddons-mailchimp-setting/page-settings-fields.php on line 52
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/realtycandy-mailchimp-idx-broker-connector/views/idxaddons-mailchimp-setting/page-settings-fields.php on line 29
    • > PHP Notice
      Undefined variable: field in wp-content/plugins/realtycandy-mailchimp-idx-broker-connector/views/idxaddons-mailchimp-setting/page-settings-fields.php on line 52
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/realtycandy-mailchimp-idx-broker-connector/views/idxaddons-mailchimp-setting/page-settings-fields.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'TestSuite' not found in wp-content/plugins/realtycandy-mailchimp-idx-broker-connector/tests/wpps-test-suite.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
  • Screenshots: Screenshot #1 (Select this box in the setup page to match your IDX Broker leads with a MailChimp list) image missing
Please take inspiration from this readme.txt

realtycandy-mailchimp-idx-broker-connector/bootstrap.php 92% from 13 tests

The entry point to "RealtyCandy MailChimp IDX Broker Connector" version 0.1 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("realtycandy-mailchimp-idx-broker-connector.php" instead of "bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected2,321 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP195101,3542,184
JavaScript2161591
CSS12126
Markdown27020

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity22.43
▷ Minimum class complexity1.00
▷ Maximum class complexity244.00
Average method complexity2.97
▷ Minimum method complexity1.00
▷ Maximum method complexity37.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods159
▷ Static methods2817.61%
▷ Public methods8855.35%
▷ Protected methods6943.40%
▷ Private methods21.26%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants12
▷ Global constants758.33%
▷ Class constants541.67%
▷ Public constants5100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/blank.png0.27KB0.10KB▼ 61.68%