73% automated-db-schenker-shipping

Code Review | Automated DB Schenker Shipping

WordPress plugin Automated DB Schenker Shipping scored73%from 54 tests.

About plugin

  • Plugin page: automated-db-sche...
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 2.6-8.2
  • WordPress version: 6.3.1
  • First release: Dec 19, 2020
  • Latest release: Nov 10, 2023
  • Number of updates: 19
  • Update frequency: every 55.7 days
  • Top authors: hitstacks (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,090 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

Analyzing server-side resources used by Automated DB Schenker Shipping
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0041.33 ▲6.96
Dashboard /wp-admin3.31 ▼0.0441.64 ▼22.05
Posts /wp-admin/edit.php3.36 ▲0.0046.32 ▼0.72
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.28 ▼2.34
Media Library /wp-admin/upload.php3.23 ▲0.0034.28 ▲3.22

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

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

Browser metrics Passed 4 tests

Automated DB Schenker Shipping: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6814.69 ▲0.362.06 ▲0.1041.75 ▼0.84
Dashboard /wp-admin2,195 ▲155.56 ▼0.0984.16 ▼5.0339.21 ▼4.35
Posts /wp-admin/edit.php2,100 ▼31.96 ▼0.0038.63 ▼1.4135.51 ▲0.25
Add New Post /wp-admin/post-new.php1,526 ▼323.07 ▼0.24650.13 ▲11.7862.03 ▲7.50
Media Library /wp-admin/upload.php1,394 ▼94.18 ▲0.0097.70 ▲0.7641.70 ▼0.11

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Please take a closer look at the following
  • 693× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Psr\\Log\\AbstractLogger' not found in wp-content/plugins/automated-db-schenker-shipping/controllors/classes/gtrans/vendor/psr/log/Psr/Log/NullLogger.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'Monolog\\Processor\\ProcessorInterface' not found in wp-content/plugins/automated-db-schenker-shipping/controllors/classes/gtrans/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/automated-db-schenker-shipping/controllors/classes/gtrans/vendor/google/common-protos/src/Api/Distribution/Exemplar.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/automated-db-schenker-shipping/controllors/classes/gtrans/vendor/google/protobuf/src/Google/Protobuf/Internal/EnumDescriptorProto.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/automated-db-schenker-shipping/controllors/classes/gtrans/vendor/google/gax/tests/Tests/Unit/FixedSizeCollectionTest.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Prophecy\\Argument\\Token\\TokenInterface' not found in wp-content/plugins/automated-db-schenker-shipping/controllors/classes/gtrans/vendor/google/cloud-core/src/Testing/ArrayHasSameValuesToken.php:14
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Auth\\CredentialsLoader' not found in wp-content/plugins/automated-db-schenker-shipping/controllors/classes/gtrans/vendor/google/auth/src/Credentials/UserRefreshCredentials.php:35
    • > PHP Fatal error
      Uncaught Error: Class 'Google\\Protobuf\\Internal\\Message' not found in wp-content/plugins/automated-db-schenker-shipping/controllors/classes/gtrans/vendor/google/common-protos/src/Api/Expr/V1alpha1/SourcePosition.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'Grpc\\Gcp\\GcpBaseCall' not found in wp-content/plugins/automated-db-schenker-shipping/controllors/classes/gtrans/vendor/google/grpc-gcp/src/GCPBidiStreamingCall.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/automated-db-schenker-shipping/controllors/classes/gtrans/vendor/google/gax/tests/Tests/Unit/BidiStreamTest.php:42

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 86% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: There are too many tags (16 tag instead of maximum 10)
The official readme.txt might help

automated-db-schenker-shipping/hitshipo_dbs_basic.php 77% from 13 tests

This is the main PHP file of "Automated DB Schenker Shipping" version 1.3.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("4.0.1" instead of "2.6")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("automated-db-schenker-shipping.php" instead of "hitshipo_dbs_basic.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis 3% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Please fix the following items
  • Do not distribute dangerous files with your plugin
    • .bat - Batch File in Windows
      • wp-content/plugins/automated-db-schenker-shipping/controllors/classes/gtrans/vendor/bin/google-cloud-batch.bat
82,443 lines of code in 1,292 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,18816,20171,36473,247
Markdown421,66805,164
JSON36403,250
XSLT22320209
XML615182
Bourne Shell94681172
YAML410098
Protocol Buffers2143862
Python1174346
make1409
DOS Batch1004

PHP code 50% from 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Method cyclomatic complexity should be reduced to less than 100 (currently 141)
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity5.72
▷ Minimum class complexity1.00
▷ Maximum class complexity528.00
Average method complexity1.84
▷ Minimum method complexity1.00
▷ Maximum method complexity141.00
Code structure
Namespaces165
Interfaces52
Traits58
Classes1,051
▷ Abstract classes181.71%
▷ Concrete classes1,03398.29%
▷ Final classes151.45%
Methods6,433
▷ Static methods5628.74%
▷ Public methods5,70288.64%
▷ Protected methods2353.65%
▷ Private methods4967.71%
Functions290
▷ Named functions7626.21%
▷ Anonymous functions21473.79%
Constants584
▷ Global constants30.51%
▷ Class constants58199.49%
▷ Public constants56196.56%

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