84% midwest-logistics

Code Review | Midwest Logistics

WordPress plugin Midwest Logistics scored84%from 54 tests.

About plugin

  • Plugin page: midwest-logistics
  • Plugin version: 1.1.21
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0+
  • WordPress version: 6.3.1
  • First release: Nov 29, 2017
  • Latest release: Aug 15, 2023
  • Number of updates: 69
  • Update frequency: every 30.9 days
  • Top authors: skynetsolutions (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,636 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.03MB] [CPU: ▼2.76ms] Passed 4 tests

Server-side resources used by Midwest Logistics
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.13 ▼3.39
Dashboard /wp-admin3.34 ▲0.0347.19 ▼0.27
Posts /wp-admin/edit.php3.39 ▲0.0351.66 ▲7.42
Add New Post /wp-admin/post-new.php5.94 ▲0.0592.36 ▼7.01
Media Library /wp-admin/upload.php3.26 ▲0.0334.24 ▼0.35

Server storage [IO: ▲0.23MB] [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: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Midwest Logistics: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲4613.17 ▼1.201.51 ▼0.5338.32 ▼6.09
Dashboard /wp-admin2,226 ▲355.89 ▲0.00109.10 ▲7.5242.11 ▲4.29
Posts /wp-admin/edit.php2,106 ▲172.05 ▲0.0641.35 ▼0.4135.14 ▼1.18
Add New Post /wp-admin/post-new.php1,526 ▼1317.40 ▼0.88659.89 ▲39.0053.98 ▼5.41
Media Library /wp-admin/upload.php1,405 ▲174.23 ▲0.02105.03 ▼6.1546.21 ▲0.32

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/midwest-logistics/data/data-usps-flat-rate-boxes.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/midwest-logistics/classes/class-ml-settings.php:413
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/midwest-logistics/classes/class-ml-settings-orders.php:349
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/midwest-logistics/classes/class-ml-stock.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/midwest-logistics/classes/class-ml-order.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/midwest-logistics/data/data-usps-services.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Shipping_Method' not found in wp-content/plugins/midwest-logistics/classes/class-wc-ml-shipping-method.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention: You can look at the official readme.txt

midwest-logistics/midwest-wholesale.php 92% from 13 tests

The entry point to "Midwest Logistics" version 1.1.21 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("midwest-logistics.php" instead of "midwest-wholesale.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected3,557 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP185872823,523
JavaScript181234

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity30.44
▷ Minimum class complexity8.00
▷ Maximum class complexity113.00
Average method complexity5.14
▷ Minimum method complexity1.00
▷ Maximum method complexity60.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods64
▷ Static methods00.00%
▷ Public methods5789.06%
▷ Protected methods00.00%
▷ Private methods710.94%
Functions39
▷ Named functions3897.44%
▷ Anonymous functions12.56%
Constants17
▷ Global constants17100.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
There are no PNG files in this plugin