84% droppa-shipping

Code Review | Droppa Shipping WooCommerce Plugin

WordPress plugin Droppa Shipping WooCommerce Plugin scored84%from 54 tests.

About plugin

  • Plugin page: droppa-shipping
  • Plugin version: 1.0.7
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6.0-5.8.1
  • WordPress version: 6.3.1
  • First release: Mar 16, 2021
  • Latest release: Oct 15, 2021
  • Number of updates: 21
  • Update frequency: every 10.2 days
  • Top authors: droppagroup (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /685 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.31ms] Passed 4 tests

A check of server-side resources used by Droppa Shipping WooCommerce Plugin
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.33 ▼6.13
Dashboard /wp-admin3.32 ▲0.0148.19 ▼8.28
Posts /wp-admin/edit.php3.37 ▲0.0157.43 ▲7.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0189.24 ▼9.21
Media Library /wp-admin/upload.php3.24 ▲0.0134.12 ▼1.60

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 97 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Droppa Shipping WooCommerce Plugin
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.73 ▲0.051.88 ▲0.0741.78 ▼6.27
Dashboard /wp-admin2,206 ▲185.80 ▲0.88104.16 ▼7.2142.38 ▼0.57
Posts /wp-admin/edit.php2,089 ▲31.98 ▼0.0139.03 ▲0.1536.68 ▲2.74
Add New Post /wp-admin/post-new.php1,538 ▲1923.39 ▼0.01660.35 ▼17.7262.87 ▲12.58
Media Library /wp-admin/upload.php1,388 ▼34.26 ▲0.05102.64 ▼2.5249.86 ▲4.53

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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 take a closer look at the following
  • 26× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GrahamCampbell\\ResultType\\Result' not found in wp-content/plugins/droppa-shipping/includes/vendor/graham-campbell/result-type/src/Success.php:24
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Parser\\ParserInterface' not found in wp-content/plugins/droppa-shipping/includes/vendor/vlucas/phpdotenv/src/Parser/Parser.php:12
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\RepositoryInterface' not found in wp-content/plugins/droppa-shipping/includes/vendor/vlucas/phpdotenv/src/Repository/AdapterRepository.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\ReaderInterface' not found in wp-content/plugins/droppa-shipping/includes/vendor/vlucas/phpdotenv/src/Repository/Adapter/AdapterInterface.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/droppa-shipping/includes/functions.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'PhpOption\\Option' not found in wp-content/plugins/droppa-shipping/includes/vendor/phpoption/phpoption/src/PhpOption/None.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\AdapterInterface' not found in wp-content/plugins/droppa-shipping/includes/vendor/vlucas/phpdotenv/src/Repository/Adapter/ArrayAdapter.php:10
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\WriterInterface' not found in wp-content/plugins/droppa-shipping/includes/vendor/vlucas/phpdotenv/src/Repository/Adapter/MultiWriter.php:7
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Exception\\ExceptionInterface' not found in wp-content/plugins/droppa-shipping/includes/vendor/vlucas/phpdotenv/src/Exception/InvalidFileException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Dotenv\\Repository\\Adapter\\WriterInterface' not found in wp-content/plugins/droppa-shipping/includes/vendor/vlucas/phpdotenv/src/Repository/Adapter/GuardedWriter.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
2 plugin tags: courier, shipping

droppa-shipping/woocommerce-droppa-plugin.php 92% from 13 tests

The main PHP script in "Droppa Shipping WooCommerce Plugin" version 1.0.7 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("droppa-shipping.php" instead of "woocommerce-droppa-plugin.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected8,252 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
PHP771,1732,5767,468
JSON700732
Markdown313036
make17016

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity9.27
▷ Minimum class complexity1.00
▷ Maximum class complexity162.00
Average method complexity2.46
▷ Minimum method complexity1.00
▷ Maximum method complexity46.00
Code structure
Namespaces16
Interfaces9
Traits0
Classes54
▷ Abstract classes23.70%
▷ Concrete classes5296.30%
▷ Final classes4076.92%
Methods386
▷ Static methods13635.23%
▷ Public methods33687.05%
▷ Protected methods00.00%
▷ Private methods5012.95%
Functions166
▷ Named functions11569.28%
▷ Anonymous functions5130.72%
Constants30
▷ Global constants1033.33%
▷ Class constants2066.67%
▷ Public constants945.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin