72% site-watch

Code Review | Site Spy

WordPress plugin Site Spy scored 72% from 54 tests.

About plugin

  • Plugin page: site-watch
  • Plugin version: 0.5.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.1.0
  • WordPress version: 5.9.2
  • First release: Dec 27, 2014
  • Latest release: Aug 1, 2015
  • Number of updates: 33
  • Update frequency: every 6.6 days
  • Top authors: bobriley (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active / 3,747 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▲0.17MB] [CPU: ▼297.43ms] Passed 4 tests

Analyzing server-side resources used by Site Spy
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3165.14 ▲0.20
Dashboard /wp-admin3.62 ▲0.2142.75 ▼2.99
Posts /wp-admin/edit.php3.91 ▼0.0141.86 ▼14.42
Add New Post /wp-admin/post-new.php7.15 ▲0.18101.51 ▼1,172.46
Media Library /wp-admin/upload.php3.57 ▲0.2730.64 ▲0.15
User Event Type /wp-admin/admin.php?page=site-watch-user-event-type3.6024.25
Intelligence /wp-admin/admin.php?page=site-watch-intelligence3.6025.58
Page Trigger /wp-admin/admin.php?page=site-watch-page-trigger3.6423.19
Contacts /wp-admin/admin.php?page=site-watch-people3.5923.90
Support /wp-admin/admin.php?page=site-watch-support3.6027.19
Click Trigger /wp-admin/admin.php?page=site-watch-click-trigger3.6231.36
Dashboard /wp-admin/admin.php?page=site-watch3.6046.19
Settings /wp-admin/admin.php?page=site-watch-settings3.6025.72
List /wp-admin/admin.php?page=site-watch-list3.6023.78
Form /wp-admin/admin.php?page=site-watch-form3.5221.77

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 172 new files
Database: 4 new tables, 1 new option
New tables
wp_easy_pie_ibc_public_ids
wp_easy_pie_ibc_contacts
wp_easy_pie_ibc_entities
wp_easy_pie_ibc_events
New WordPress options
easy-pie-ibc-options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Site Spy
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,932 ▲18716.20 ▲0.8812.27 ▲5.322.26 ▲0.02
Dashboard /wp-admin2,948 ▲876.17 ▼0.01128.25 ▼6.92193.12 ▲21.69
Posts /wp-admin/edit.php2,741 ▲533.24 ▼0.0159.85 ▼6.55144.03 ▼7.47
Add New Post /wp-admin/post-new.php1,652 ▼5919.70 ▼2.52431.51 ▼100.75190.65 ▲9.76
Media Library /wp-admin/upload.php1,750 ▲525.55 ▲0.01157.34 ▲0.24231.10 ▲16.64
User Event Type /wp-admin/admin.php?page=site-watch-user-event-type1,2322.4852.21214.64
Intelligence /wp-admin/admin.php?page=site-watch-intelligence1,3202.6452.51114.08
Page Trigger /wp-admin/admin.php?page=site-watch-page-trigger1,3993.1456.78239.16
Contacts /wp-admin/admin.php?page=site-watch-people1,6762.5055.32123.29
Support /wp-admin/admin.php?page=site-watch-support1,2432.6253.64183.03
Click Trigger /wp-admin/admin.php?page=site-watch-click-trigger1,3203.0857.26261.51
Dashboard /wp-admin/admin.php?page=site-watch1,6103.0460.21199.93
Settings /wp-admin/admin.php?page=site-watch-settings1,2722.6253.00125.69
List /wp-admin/admin.php?page=site-watch-list1,2552.6254.23203.05
Form /wp-admin/admin.php?page=site-watch-form1,0112.7753.2572.54

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 4 tables in the database
    • wp_easy_pie_ibc_public_ids
    • wp_easy_pie_ibc_entities
    • wp_easy_pie_ibc_contacts
    • wp_easy_pie_ibc_events

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=site-watch-list
    • > User deprecated in wp-includes/functions.php+5326
    screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=site-watch-list
    • > User deprecated in wp-includes/functions.php+5326
    get_screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=site-watch-form
    • > Warning in wp-includes/class-wp-hook.php+307
    call_user_func_array() expects parameter 1 to be a valid callback, class 'EZP_IBC' does not have a method 'display_form_page'

SRP 50% 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
Almost there! Just fix the following items
  • 83× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/site-watch/ui-components/class-ezp-ibc-contact-list-control.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/site-watch/classes/Utilities/class-ezp-ibc-u.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'EZP_IBC_U' not found in wp-content/plugins/site-watch/pages/people/page-contact.php:23
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/site-watch/ui-components/class-ezp-ibc-event-list-control.php on line 25
    • > PHP Fatal error
      Uncaught Error: Class 'EZP_IBC_U' not found in wp-content/plugins/site-watch/pages/intelligence/page-intelligence-scoring-tab.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/site-watch/classes/Utilities/class-ezp-ibc-u.php:47
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/site-watch/ui-components/class-ezp-ibc-user-event-type-list-control.php on line 26
    • > PHP Fatal error
      Uncaught Error: Class 'EZP_IBC_U' not found in wp-content/plugins/site-watch/pages/people/page-contact-events-tab.php:23
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/class-wp-list-table.php): failed to open stream: No such file or directory in wp-content/plugins/site-watch/ui-components/class-ezp-ibc-page-trigger-list-control.php on line 26
    • > PHP Fatal error
      Uncaught Error: Class 'EZP_IBC_U' not found in wp-content/plugins/site-watch/classes/Entities/Form/class-ezp-ibc-form-field-entity.php:24

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=site-watch
    • > Network (severe)
    wp-content/plugins/site-watch/js/dashboard/page-dashboard-start-here-tab.js?0.5.3 - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=site-watch-settings
    • > Network (severe)
    wp-content/plugins/site-watch/js/settings/page-settings-basic-tab.js?0.5.3 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Too many tags (14 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

site-watch/site-watch.php Passed 13 tests

The entry point to "Site Spy" version 0.5.3 is a PHP file that has certain tags in its header comment area
135 characters long description:
Tells you who's visiting your site and how valuable they are. Uses event tracking, lead capture and lead scoring. Supports WooCommerce.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected19,962 lines of code in 131 files:
LanguageFilesBlank linesComment linesLines of code
PHP713,0113,0059,486
JavaScript229777364,445
CSS10561272,996
Sass1323241,256
LESS1323331,247
SVG100520
HTML12012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.19
▷ Minimum class complexity1.00
▷ Maximum class complexity100.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces1
Traits0
Classes55
▷ Abstract classes1221.82%
▷ Concrete classes4378.18%
▷ Final classes00.00%
Methods409
▷ Static methods15036.67%
▷ Public methods35687.04%
▷ Protected methods10.24%
▷ Private methods5212.71%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants46
▷ Global constants00.00%
▷ Class constants46100.00%
▷ Public constants46100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
32 PNG files occupy 0.52MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
styles/jqueryui/1.11.2/themes/smoothness/images/ui-icons_454545_256x240.png6.83KB4.17KB▼ 38.86%
styles/images/controls.png2.74KB1.42KB▼ 48.29%
images/start-here/10-filter-by-external-links.png24.70KB10.00KB▼ 59.49%
images/start-here/9-edit-list.png6.98KB3.27KB▼ 53.18%
images/start-here/4-add-click-trigger.png25.74KB9.91KB▼ 61.51%