46% curbside-pickup

Code Review | Curbside Pickup

WordPress plugin Curbside Pickup scored46%from 54 tests.

About plugin

  • Plugin page: curbside-pickup
  • Plugin version: 2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-5.7.2
  • WordPress version: 6.3.1
  • First release: Jul 27, 2020
  • Latest release: Jun 25, 2021
  • Number of updates: 20
  • Update frequency: every 16.8 days
  • Top authors: richardgabriel (90%)ghuger (15%)

Code review

54 tests

User reviews

4 reviews

Install metrics

50+ active /1,553 total downloads

Benchmarks

Plugin footprint 48% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲2.05MB] [CPU: ▼0.81ms] Passed 4 tests

An overview of server-side resources used by Curbside Pickup
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /6.53 ▲3.0769.66 ▲27.05
Dashboard /wp-admin5.99 ▲2.6956.32 ▲7.41
Posts /wp-admin/edit.php5.99 ▲2.6454.75 ▲3.33
Add New Post /wp-admin/post-new.php5.99 ▲0.1157.87 ▼35.56
Media Library /wp-admin/upload.php5.99 ▲2.7760.06 ▲21.59
Dashboard /wp-admin/plugins.php?page=meta-box5.9957.86
Scheduled Pickups /wp-admin/edit.php?post_type=scheduled-pickup5.9952.47
Order List /wp-admin/admin.php?page=curbside-pickup-order-list5.9953.03
About Plugin /wp-admin/admin.php?page=curbside-pickup/curbside-pickup.php_aloha5.9952.53
Pickup Schedules /wp-admin/edit.php?post_type=pickup-schedule5.9952.47
Pick List /wp-admin/admin.php?page=curbside-pickup-packing-list5.9952.35
Dashboard /wp-admin/admin.php?page=curbside-pickup/dashboard5.9953.34
Pickup Locations /wp-admin/admin.php?page=curbside-pickup-pickup-locations5.9953.50
Settings /wp-admin/admin.php?page=curbside-pickup-settings5.9954.83
/wp-admin/admin.php?page=5.9955.20

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 546 new files
Database: 1 new table, 7 new options
New tables
wp_mb_relationships
New WordPress options
curbside_pickup_ajax_events
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Curbside Pickup
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,300 ▲54314.03 ▼0.355.32 ▲3.3842.88 ▼4.62
Dashboard /wp-admin2,611 ▲4235.34 ▲0.46128.79 ▲11.1950.90 ▲2.73
Posts /wp-admin/edit.php2,184 ▲952.39 ▲0.3341.56 ▲7.3931.34 ▼1.02
Add New Post /wp-admin/post-new.php6,421 ▲4,88824.65 ▲1.53918.15 ▲225.4735.16 ▼20.64
Media Library /wp-admin/upload.php1,480 ▲924.52 ▲0.31115.72 ▲12.5356.79 ▲6.87
Dashboard /wp-admin/plugins.php?page=meta-box1,3972.3430.4251.91
Scheduled Pickups /wp-admin/edit.php?post_type=scheduled-pickup1,2062.5036.2728.99
Order List /wp-admin/admin.php?page=curbside-pickup-order-list9461.9328.0135.09
About Plugin /wp-admin/admin.php?page=curbside-pickup/curbside-pickup.php_aloha1,1681.9126.2739.60
Pickup Schedules /wp-admin/edit.php?post_type=pickup-schedule1,6932.5437.3230.09
Pick List /wp-admin/admin.php?page=curbside-pickup-packing-list9431.9226.2530.91
Dashboard /wp-admin/admin.php?page=curbside-pickup/dashboard9272.0330.9841.29
Pickup Locations /wp-admin/admin.php?page=curbside-pickup-pickup-locations9461.8928.1832.23
Settings /wp-admin/admin.php?page=curbside-pickup-settings2,0273.2959.7662.32
/wp-admin/admin.php?page=280.440.103.87

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/curbside-pickup/include/classes/Admin_UI.php+233
    Undefined offset: -1
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_mb_relationships
  • Zombie WordPress options detected upon uninstall: 7 options
    • can_compress_scripts
    • curbside_pickup_ajax_events
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Please fix the following server-side errors
  • 10 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=
    • > Notice in wp-content/plugins/curbside-pickup/include/classes/Admin_UI.php+233
    Undefined offset: -1
  • 57 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=
    • > Notice in wp-admin/includes/plugin.php+1946
    Trying to access array offset on value of type null

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/curbside-pickup/vendor/meta-box/meta-box/inc/templates/video.php
    • > /wp-content/plugins/curbside-pickup/vendor/meta-box/meta-box/inc/templates/upload.php
    • > /wp-content/plugins/curbside-pickup/vendor/meta-box/meta-box/inc/templates/audio.php
    • > /wp-content/plugins/curbside-pickup/vendor/meta-box/meta-box/inc/templates/image-advanced.php
    • > /wp-content/plugins/curbside-pickup/vendor/meta-box/meta-box/inc/templates/media.php
  • 226× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Text_Field' not found in wp-content/plugins/curbside-pickup/vendor/meta-box/meta-box/inc/fields/fieldset-text.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/curbside-pickup/vendor/meta-box/meta-box/inc/fields/multiple-values.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Number_Field' not found in wp-content/plugins/curbside-pickup/vendor/meta-box/meta-box/inc/fields/range.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Input_Field' not found in wp-content/plugins/curbside-pickup/vendor/meta-box/meta-box/inc/fields/number.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/curbside-pickup/vendor/meta-box/meta-box/inc/about/sections/support.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Select_Field' not found in wp-content/plugins/curbside-pickup/vendor/meta-box/meta-box/inc/fields/select-tree.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'RWMB_Field' not found in wp-content/plugins/curbside-pickup/vendor/meta-box/meta-box/inc/fields/button.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'MBSP\\Storage' not found in wp-content/plugins/curbside-pickup/vendor/meta-box/mb-settings-page/src/Network/Storage.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/curbside-pickup/vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'Composer\\Installers\\BaseInstaller' not found in wp-content/plugins/curbside-pickup/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?page=
    • > Network (severe)
    wp-admin/admin.php?page= - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add images for these screenshots: #1 (The Dashboard, where you can monitor for arriving customers.), #2 (The Update Order screen, where you can complete, reschedule, or cancel an order, as well as leaving notes.)
You can look at the official readme.txt

curbside-pickup/curbside-pickup.php 92% from 13 tests

Analyzing the main PHP file in "Curbside Pickup" version 2.1
Please make the necessary changes and fix the following:
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "4.2.0")

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
Success! There were no dangerous files found in this plugin58,684 lines of code in 497 files:
LanguageFilesBlank linesComment linesLines of code
CSS623,97721817,923
PHP3133,2587,68717,764
SVG40129,429
Sass21,21699,165
JavaScript1047976593,283
JSON400471
HTML1651366
Markdown2600179
PO File2101755
YAML23029
XML10020

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity6.75
▷ Minimum class complexity1.00
▷ Maximum class complexity82.00
Average method complexity2.33
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces9
Interfaces2
Traits0
Classes274
▷ Abstract classes93.28%
▷ Concrete classes26596.72%
▷ Final classes00.00%
Methods1,194
▷ Static methods33227.81%
▷ Public methods1,03686.77%
▷ Protected methods978.12%
▷ Private methods615.11%
Functions60
▷ Named functions3558.33%
▷ Anonymous functions2541.67%
Constants12
▷ Global constants866.67%
▷ Class constants433.33%
▷ Public constants4100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
17 compressed PNG files occupy 0.16MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
vendor/meta-box/meta-box/img/jqueryui/ui-bg_glass_95_fef1ec_1x400.png0.12KB0.14KB0.00%
vendor/meta-box/meta-box/img/jqueryui/ui-bg_glass_55_fbf9ee_1x400.png0.12KB0.14KB0.00%
vendor/meta-box/meta-box/img/jqueryui/ui-bg_glass_75_e6e6e6_1x400.png0.11KB0.14KB0.00%
vendor/meta-box/meta-box/img/jqueryui/ui-bg_highlight-soft_75_cccccc_1x100.png0.10KB0.17KB0.00%
vendor/meta-box/meta-box/img/jqueryui/ui-bg_flat_75_ffffff_40x100.png0.17KB0.08KB▼ 51.12%