10% snorkel

Code Review | Snorkel

WordPress plugin Snorkel scored 10% from 54 tests.

About plugin

  • Plugin page: snorkel
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.4
  • WordPress version: 6.3.1
  • First release: Dec 11, 2019
  • Latest release: Dec 11, 2019
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: benjaminaschultz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 492 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The following installer errors require your attention
  • Install procedure validation failed for this plugin
    • > Notice in wp-content/plugins/snorkel/includes/class-snorkel.php+126
    Undefined property: Snorkel::$url

Server metrics [RAM: ▼1.55MB] [CPU: ▼53.62ms] Passed 4 tests

A check of server-side resources used by Snorkel
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.43 ▼1.037.49 ▼35.42
Dashboard /wp-admin2.45 ▼0.858.48 ▼47.33
Posts /wp-admin/edit.php2.45 ▼0.908.64 ▼40.98
Add New Post /wp-admin/post-new.php2.45 ▼3.437.79 ▼90.74
Media Library /wp-admin/upload.php2.45 ▼0.778.39 ▼25.51
Snorkel Settings /wp-admin/options-general.php?page=snorkel2.459.05

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 139 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

Snorkel: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲9113.40 ▼1.032.68 ▲0.9440.37 ▼2.31
Dashboard /wp-admin2,212 ▲245.85 ▲0.95110.64 ▼4.8444.08 ▼2.20
Posts /wp-admin/edit.php2,095 ▲62.06 ▲0.0438.61 ▼5.6636.17 ▲0.46
Add New Post /wp-admin/post-new.php1,542 ▲818.49 ▼4.75602.20 ▼53.2551.06 ▼2.01
Media Library /wp-admin/upload.php1,394 ▲94.19 ▼0.02101.02 ▼5.4241.30 ▼2.68
Snorkel Settings /wp-admin/options-general.php?page=snorkel8142.0227.0427.14

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% 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
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/snorkel/includes/class-snorkel.php+126
    Undefined property: Snorkel::$url
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=snorkel
    • > Notice in wp-content/plugins/snorkel/includes/class-snorkel.php+126
    Undefined property: Snorkel::$url
    • > GET request to /wp-admin/options-general.php?page=snorkel
    • > Notice in wp-content/plugins/snorkel/admin/partials/snorkel-admin-display.php+29
    Trying to access array offset on value of type bool

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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/snorkel/public/partials/snorkel-public-display.php
  • 46× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/snorkel/vendor/guzzlehttp/psr7/src/AppendStream.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\ResponseInterface' not found in wp-content/plugins/snorkel/vendor/guzzlehttp/psr7/src/Response.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/snorkel/includes/class-snorkel-activator.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\RequestException' not found in wp-content/plugins/snorkel/vendor/guzzlehttp/guzzle/src/Exception/ConnectException.php:11
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/snorkel/vendor/guzzlehttp/psr7/src/DroppingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/snorkel/vendor/guzzlehttp/psr7/src/MultipartStream.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/snorkel/vendor/guzzlehttp/psr7/src/CachingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Cookie\\CookieJar' not found in wp-content/plugins/snorkel/vendor/guzzlehttp/guzzle/src/Cookie/FileCookieJar.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/snorkel/admin/partials/snorkel-admin-display.php:19
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\ClientInterface' not found in wp-content/plugins/snorkel/vendor/guzzlehttp/guzzle/src/Client.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
10 plugin tags: olark live chat, snorkel, chat, data, roi...

snorkel/snorkel.php 92% from 13 tests

"Snorkel" version 1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 147 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected12,203 lines of code in 125 files:
LanguageFilesBlank linesComment linesLines of code
PHP1041,8035,2858,495
Markdown101,00603,211
JSON700473
JavaScript10015
make1409
CSS2080

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity12.90
▷ Minimum class complexity1.00
▷ Maximum class complexity81.00
Average method complexity2.55
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces8
Interfaces14
Traits2
Classes70
▷ Abstract classes00.00%
▷ Concrete classes70100.00%
▷ Final classes811.43%
Methods679
▷ Static methods6910.16%
▷ Public methods54880.71%
▷ Protected methods40.59%
▷ Private methods12718.70%
Functions146
▷ Named functions6041.10%
▷ Anonymous functions8658.90%
Constants53
▷ Global constants11.89%
▷ Class constants5298.11%
▷ Public constants52100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin