10% soapberry

Code Review | Soapberry

WordPress plugin Soapberry scored10%from 54 tests.

About plugin

  • Plugin page: soapberry
  • Plugin version: 1.1.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.4
  • WordPress version: 6.3.1
  • First release: Jan 2, 2020
  • Latest release: Jul 4, 2020
  • Number of updates: 4
  • Update frequency: every 46.0 days
  • Top authors: brookedot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /968 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, class 'Soapberry\Soapberry' does not have a method 'activate'

Server metrics [RAM: ▲0.00MB] [CPU: ▼9.94ms] Passed 4 tests

An overview of server-side resources used by Soapberry
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.52 ▼7.96
Dashboard /wp-admin3.32 ▼0.0251.99 ▼15.78
Posts /wp-admin/edit.php3.37 ▲0.0246.37 ▼2.73
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.65 ▼12.88
Media Library /wp-admin/upload.php3.24 ▲0.0134.47 ▼3.15
Soapberry /wp-admin/options-general.php?page=soapberry3.1832.18

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Soapberry
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5814.74 ▲0.471.99 ▲0.0142.88 ▼1.30
Dashboard /wp-admin2,207 ▲194.82 ▼0.06102.75 ▼4.3938.35 ▼3.49
Posts /wp-admin/edit.php2,093 ▲72.02 ▲0.0238.72 ▼1.0332.69 ▼5.92
Add New Post /wp-admin/post-new.php1,536 ▲12523.13 ▲5.22669.26 ▲40.5058.07 ▲8.10
Media Library /wp-admin/upload.php1,392 ▲74.22 ▲0.0096.76 ▼7.1541.55 ▼6.14
Soapberry /wp-admin/options-general.php?page=soapberry9132.0325.3227.08

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > Warning in wp-includes/class-wp-hook.php+310
    call_user_func_array() expects parameter 1 to be a valid callback, function 'uninstall' not found or invalid function name
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=soapberry
    • > Notice in wp-content/plugins/soapberry/includes/class-admin-settings.php+178
    Undefined index: consent_cookie

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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Soapberry\\add_action() in wp-content/plugins/soapberry/includes/class-admin-settings.php:29
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Soapberry\\add_action() in wp-content/plugins/soapberry/includes/class-frontend.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: analytics, tracking, ackee, stats

soapberry/soapberry.php Passed 13 tests

Analyzing the main PHP file in "Soapberry" version 1.1.0
110 characters long description:
Collect data on your visitors while respecting their privacy using Soapberry with a self-hosted Ackee install.

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
No dangerous file extensions were detected295 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP338160265
Markdown121030

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity9.33
▷ Minimum class complexity2.00
▷ Maximum class complexity14.00
Average method complexity2.92
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods13
▷ Static methods17.69%
▷ Public methods1184.62%
▷ Protected methods00.00%
▷ Private methods215.38%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin