78% dispensary-gear

Code Review | Dispensary Gear

WordPress plugin Dispensary Gear scored78%from 54 tests.

About plugin

  • Plugin page: dispensary-gear
  • Plugin version: 2.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 3, 2018
  • Latest release: Mar 24, 2020
  • Number of updates: 42
  • Update frequency: every 18.6 days
  • Top authors: deviodigital (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,564 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼4.57ms] Passed 4 tests

Server-side resources used by Dispensary Gear
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1243.87 ▲2.11
Dashboard /wp-admin3.40 ▲0.1051.11 ▼2.67
Posts /wp-admin/edit.php3.46 ▲0.1049.24 ▼1.62
Add New Post /wp-admin/post-new.php6.11 ▲0.2296.22 ▼12.88
Media Library /wp-admin/upload.php3.33 ▲0.1036.55 ▼1.10
Gear /wp-admin/edit.php?post_type=gear3.3739.79

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Dispensary Gear
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,907 ▲14613.74 ▼0.828.71 ▲6.9442.30 ▼0.93
Dashboard /wp-admin2,202 ▲225.64 ▼0.0389.41 ▼11.7741.87 ▼6.45
Posts /wp-admin/edit.php2,110 ▲102.02 ▲0.0633.78 ▼1.7033.05 ▼2.68
Add New Post /wp-admin/post-new.php1,533 ▼222.98 ▲4.60638.15 ▼1.1050.18 ▼34.30
Media Library /wp-admin/upload.php1,407 ▲134.21 ▲0.0198.45 ▼3.9643.02 ▼1.57
Gear /wp-admin/edit.php?post_type=gear1,0871.9729.9231.64

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_wpd_gear_widget
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just fix the following items
  • 2× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/dispensary-gear/public/partials/wpd-gear-public-display.php
    • > /wp-content/plugins/dispensary-gear/admin/partials/wpd-gear-admin-display.php
  • 9× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dispensary-gear/admin/class-wpd-gear-data-output.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-gear/admin/class-wpd-gear-metaboxes.php:36
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dispensary-gear/admin/class-wpd-gear-rest-api.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-gear/admin/class-wpd-gear-post-type.php:96
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-gear/admin/wpd-gear-functions.php:87
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/dispensary-gear/admin/class-wpd-gear-settings.php:25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dispensary-gear/admin/class-wpd-gear-taxonomies.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/dispensary-gear/admin/class-wpd-gear-shortcodes.php:139
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/dispensary-gear/admin/class-wpd-gear-widgets.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
7 plugin tags: wp-dispensary, weed, dispensary, cannabis, ecommerce...

dispensary-gear/wpd-gear.php 77% from 13 tests

The main PHP file in "Dispensary Gear" ver. 2.0.4 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("dispensary-gear.php" instead of "wpd-gear.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 207 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected868 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP22300903845
CSS341015
JavaScript24546
Markdown1002

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity3.56
▷ Minimum class complexity1.00
▷ Maximum class complexity16.00
Average method complexity1.72
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods32
▷ Static methods26.25%
▷ Public methods2784.38%
▷ Protected methods00.00%
▷ Private methods515.62%
Functions32
▷ Named functions32100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/images/menu-icon.png0.28KB0.23KB▼ 17.65%