10% volunteers-guide

Code Review | The Volunteer's Guide

WordPress plugin The Volunteer's Guide scored10%from 54 tests.

About plugin

  • Plugin page: volunteers-guide
  • Plugin version: 1.0.3
  • PHP compatiblity: 7.0.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2
  • WordPress version: 6.3.1
  • First release: Oct 30, 2019
  • Latest release: Jan 6, 2020
  • Number of updates: 9
  • Update frequency: every 9.0 days
  • Top authors: horlacher (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /430 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The following installer errors require your attention
  • The plugin did not install without errors
    • > Warning in wp-content/plugins/volunteers-guide/includes/helpers/MapConfig.php+134
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

Server metrics [RAM: ▼1.88MB] [CPU: ▼66.28ms] Passed 4 tests

An overview of server-side resources used by The Volunteer's Guide
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.11 ▼1.356.69 ▼40.55
Dashboard /wp-admin2.13 ▼1.217.93 ▼66.12
Posts /wp-admin/edit.php2.14 ▼1.226.36 ▼48.64
Add New Post /wp-admin/post-new.php2.14 ▼3.759.40 ▼109.79
Media Library /wp-admin/upload.php2.14 ▼1.097.72 ▼31.33
Settings /wp-admin/admin.php?page=volunGSettings2.149.32
Overview /wp-admin/admin.php?page=volunGOverview2.147.10

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

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

Browser metrics Passed 4 tests

A check of browser resources used by The Volunteer's Guide
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,845 ▲8414.33 ▼0.271.81 ▲0.2444.81 ▲4.31
Dashboard /wp-admin2,229 ▲525.70 ▲0.1386.52 ▼9.9642.02 ▲1.18
Posts /wp-admin/edit.php2,131 ▲312.19 ▲0.1733.97 ▼1.7132.46 ▼3.78
Add New Post /wp-admin/post-new.php1,552 ▲2323.14 ▼0.52615.48 ▼3.0556.37 ▲7.91
Media Library /wp-admin/upload.php1,434 ▲344.27 ▲0.05105.49 ▼2.0147.20 ▲0.94
Settings /wp-admin/admin.php?page=volunGSettings8301.7425.4629.87
Overview /wp-admin/admin.php?page=volunGOverview8391.7427.2229.56

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/volunteers-guide/includes/helpers/MapConfig.php+134
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These server-side errors were triggered
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=volunGOverview
    • > Warning in wp-content/plugins/volunteers-guide/includes/helpers/MapConfig.php+134
    "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 4× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/volunteers-guide/public/partials/searchForm.php
    • > /wp-content/plugins/volunteers-guide/VolunteersGuide.php
    • > /wp-content/plugins/volunteers-guide/admin/partials/admin-page.php
    • > /wp-content/plugins/volunteers-guide/public/partials/projectButton.php
  • 9× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VolunteersGuide\\submit_button() in wp-content/plugins/volunteers-guide/admin/partials-settings/settings-2.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VolunteersGuide\\settings_fields() in wp-content/plugins/volunteers-guide/admin/partials-settings/settings-0.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function VolunteersGuide\\submit_button() in wp-content/plugins/volunteers-guide/admin/partials-settings/settings-1.php:11
    • > PHP Warning
      "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in wp-content/plugins/volunteers-guide/includes/helpers/MapConfig.php on line 134
    • > PHP Fatal error
      Uncaught Error: Class 'VolunteersGuide\\Infos' not found in wp-content/plugins/volunteers-guide/public/partials/worldMap.php:11
    • > PHP Notice
      Undefined variable: projCode in wp-content/plugins/volunteers-guide/public/partials/projectButton.php on line 11
    • > PHP Notice
      Undefined variable: platoOrgId in wp-content/plugins/volunteers-guide/public/partials/searchForm.php on line 8
    • > PHP Notice
      Undefined variable: content in wp-content/plugins/volunteers-guide/public/partials/projectButton.php on line 12
    • > PHP Notice
      Undefined variable: platoOrgId in wp-content/plugins/volunteers-guide/public/partials/projectButton.php on line 11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
5 plugin tags: workcamp, alliance, volunteering, plato, map

volunteers-guide/VolunteersGuide.php 85% from 13 tests

The main PHP file in "The Volunteer's Guide" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: The text domain should only use lowercase characters and dashes
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("volunteers-guide.php" instead of "VolunteersGuide.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected32,805 lines of code in 162 files:
LanguageFilesBlank linesComment linesLines of code
PHP15427182032,482
JSON300269
Markdown111050
CSS2002
JavaScript2002

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity9.20
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods101
▷ Static methods4039.60%
▷ Public methods8180.20%
▷ Protected methods1312.87%
▷ Private methods76.93%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants5
▷ Global constants120.00%
▷ Class constants480.00%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin