83% woo-dhl-auto-complete

Code Review | Woo DHL Auto Complete

WordPress plugin Woo DHL Auto Complete scored83%from 54 tests.

About plugin

  • Plugin page: woo-dhl-auto-comp...
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.5-5.2
  • WordPress version: 6.3.1
  • First release: Jun 28, 2018
  • Latest release: May 11, 2019
  • Number of updates: 7
  • Update frequency: every 45.3 days
  • Top authors: mnording10 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /589 total downloads

Benchmarks

Plugin footprint 83% 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: ▲0.07MB] [CPU: ▼3.23ms] Passed 4 tests

Analyzing server-side resources used by Woo DHL Auto Complete
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0742.96 ▲1.59
Dashboard /wp-admin3.37 ▲0.0747.84 ▼6.52
Posts /wp-admin/edit.php3.49 ▲0.1348.59 ▼1.99
Add New Post /wp-admin/post-new.php5.95 ▲0.0796.24 ▼6.01
Media Library /wp-admin/upload.php3.29 ▲0.0740.31 ▲6.48

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Woo DHL Auto Complete: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.24 ▼0.111.83 ▲0.2143.38 ▲2.14
Dashboard /wp-admin2,198 ▲185.64 ▲0.0699.28 ▲9.7841.03 ▲0.17
Posts /wp-admin/edit.php2,100 ▼01.98 ▼0.0538.94 ▲2.0836.22 ▲1.94
Add New Post /wp-admin/post-new.php1,526 ▼021.07 ▼2.22683.84 ▼9.9265.15 ▲6.66
Media Library /wp-admin/upload.php1,397 ▼64.20 ▼0.03106.20 ▲1.6847.86 ▲1.41

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/woo-dhl-auto-complete/Woo-dhl-freight-auto-complete-orders.php:105

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
These attributes need to be fixed: You can look at the official readme.txt

woo-dhl-auto-complete/Woo-dhl-freight-auto-complete-orders.php 85% from 13 tests

The main PHP file in "Woo DHL Auto Complete" ver. 1.2.0 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: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("woo-dhl-auto-complete.php" instead of "Woo-dhl-freight-auto-complete-orders.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected368 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP43468316
PO File1151652

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.83
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods25
▷ Static methods00.00%
▷ Public methods1872.00%
▷ Protected methods00.00%
▷ Private methods728.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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