62% visitorsproof

Code Review | Visitorsproof - a social proof and FOMO plugin, recent sales popup notification

WordPress plugin Visitorsproof - a social proof and FOMO plugin, recent sales popup notification scored 62% from 54 tests.

About plugin

  • Plugin page: visitorsproof
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-5.6
  • WordPress version: 5.9.2
  • First release: Jul 31, 2020
  • Latest release: Jan 6, 2021
  • Number of updates: 12
  • Update frequency: every 14.2 days
  • Top authors: visitorsproof (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active / 537 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼302.08ms] Passed 4 tests

Server-side resources used by Visitorsproof - a social proof and FOMO plugin, recent sales popup notification
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0857.90 ▼0.34
Dashboard /wp-admin3.45 ▲0.0435.89 ▲2.65
Posts /wp-admin/edit.php3.68 ▲0.0437.34 ▲1.82
Add New Post /wp-admin/post-new.php6.92 ▼0.0597.43 ▼1,203.64
Media Library /wp-admin/upload.php3.33 ▲0.0324.70 ▼6.14
Reports /wp-admin/admin.php?page=visitors-proof-reports3.5024.63
Contact Form 7 /wp-admin/admin.php?page=visitors-proof-cf73.3923.73
Support /wp-admin/admin.php?page=visitors-proof-support3.3221.69
Settings /wp-admin/admin.php?page=visitors-proof-settings3.3723.41
Custom Notifications /wp-admin/admin.php?page=visitors-proof-custom-notifications3.3824.54
All Notifications /wp-admin/admin.php?page=visitors-proof-notifications3.4632.90

Server storage [IO: ▲1.40MB] [DB: ▲0.15MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 51 new files
Database: 6 new tables, 6 new options
New tables
wp_visitors_proof_notifications
wp_visitors_proof_ips
wp_visitors_proof_actions
wp_visitors_proof_visits
wp_visitors_proof_icons
wp_visitors_proof_integrations
New WordPress options
visitors_proof_settings
visitors_proof_enabled
visitors_proof_license
visitors_proof_site_domain
visitors_proof_site_id
visitors_proof_version

Browser metrics Passed 4 tests

A check of browser resources used by Visitorsproof - a social proof and FOMO plugin, recent sales popup notification
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,097 ▲35316.38 ▲0.6014.95 ▲8.2520.94 ▲18.03
Dashboard /wp-admin2,949 ▲916.16 ▼0.02131.34 ▼4.34166.52 ▲8.74
Posts /wp-admin/edit.php2,751 ▲603.28 ▲0.0463.76 ▲0.18145.06 ▲0.76
Add New Post /wp-admin/post-new.php1,824 ▲16420.36 ▲3.96408.04 ▼1.59193.18 ▲35.46
Media Library /wp-admin/upload.php1,742 ▲445.59 ▲0.17128.11 ▼8.64200.62 ▲6.73
Reports /wp-admin/admin.php?page=visitors-proof-reports1,3782.6455.59150.14
Contact Form 7 /wp-admin/admin.php?page=visitors-proof-cf71,2212.7858.58102.21
Support /wp-admin/admin.php?page=visitors-proof-support1,1522.6453.78142.71
Settings /wp-admin/admin.php?page=visitors-proof-settings2,1223.3570.59154.67
Custom Notifications /wp-admin/admin.php?page=visitors-proof-custom-notifications3,4743.8497.53168.69
All Notifications /wp-admin/admin.php?page=visitors-proof-notifications4,6774.33150.43161.91

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie tables detected upon uninstall: 6 tables
    • wp_visitors_proof_actions
    • wp_visitors_proof_integrations
    • wp_visitors_proof_icons
    • wp_visitors_proof_ips
    • wp_visitors_proof_visits
    • wp_visitors_proof_notifications
  • Zombie WordPress options detected upon uninstall: 6 options
    • visitors_proof_version
    • visitors_proof_license
    • visitors_proof_site_id
    • visitors_proof_settings
    • visitors_proof_enabled
    • visitors_proof_site_domain

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/visitorsproof/visitors-proof.php
  • 20× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Warning
      Use of undefined constant VISITORS_PROOF_NAME - assumed 'VISITORS_PROOF_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/visitorsproof/inc/page_support.php on line 3
    • > PHP Warning
      Use of undefined constant VISITORS_PROOF_PAGE_SETTINGS - assumed 'VISITORS_PROOF_PAGE_SETTINGS' (this will throw an Error in a future version of PHP) in wp-content/plugins/visitorsproof/inc/page_settings.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/visitorsproof/inc/pages.php:3
    • > 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/visitorsproof/inc/contact-form-7.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/visitorsproof/inc/ajax.php:389
    • > PHP Notice
      Undefined variable: vpchr in wp-content/plugins/visitorsproof/inc/page_reports.php on line 43
    • > 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/visitorsproof/inc/custom-notifications.php on line 3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/visitorsproof/inc/page_all_notifications.php:2
    • > PHP Notice
      Undefined variable: wpdb in wp-content/plugins/visitorsproof/inc/page_all_notifications.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_visitors_proof_cf7_active() in wp-content/plugins/visitorsproof/inc/page_cf7.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please fix the following user-side errors
    • > GET request to /wp-admin/admin.php?page=visitors-proof-notifications
    • > Javascript (severe) in unknown
    https://platform.linkedin.com/xdoor/scripts/in.js 13:107371 Uncaught Error: [Messenger] Required property 'origin' was not provided

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed:
  • Screenshots: Add descriptions for screenshots #1, #2, #3, #4 in visitorsproof/assets to your readme.txt
You can look at the official readme.txt

visitorsproof/visitors-proof.php 92% from 13 tests

The principal PHP file in "Visitorsproof - a social proof and FOMO plugin, recent sales popup notification" v. 1.0.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("visitorsproof.php" instead of "visitors-proof.php")

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
Good job! No executable or dangerous file extensions detected10,604 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript69263734,885
CSS656753,080
PHP14194292,638
SVG1001

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity39.67
▷ Minimum class complexity24.00
▷ Maximum class complexity70.00
Average method complexity2.68
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods69
▷ Static methods1014.49%
▷ Public methods69100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions29
▷ Named functions29100.00%
▷ Anonymous functions00.00%
Constants24
▷ Global constants24100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
10 PNG files occupy 0.49MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/necklace.png13.72KB4.20KB▼ 69.36%
assets/demo-reports.png369.55KB129.05KB▼ 65.08%
assets/drags.png3.96KB1.14KB▼ 71.19%
assets/canon-camera.png15.75KB5.47KB▼ 65.28%
assets/google-pixel.png24.52KB6.57KB▼ 73.20%