84% company-autocomplete

Code Review | Company Autocomplete by LEI Register

WordPress plugin Company Autocomplete by LEI Register scored84%from 54 tests.

About plugin

  • Plugin page: company-autocomplete
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 6.3.1
  • First release: Mar 17, 2021
  • Latest release: Apr 1, 2021
  • Number of updates: 6
  • Update frequency: every 2.5 days
  • Top authors: leiregister (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /405 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

This is a short check of server-side resources used by Company Autocomplete by LEI Register
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.22 ▼2.01
Dashboard /wp-admin3.31 ▼0.0451.40 ▼20.80
Posts /wp-admin/edit.php3.36 ▲0.0052.56 ▲1.41
Add New Post /wp-admin/post-new.php5.89 ▲0.00104.82 ▼3.03
Media Library /wp-admin/upload.php3.23 ▲0.0037.90 ▼5.72

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Company Autocomplete by LEI Register: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,872 ▲11113.39 ▼0.799.45 ▲7.5842.57 ▼4.16
Dashboard /wp-admin2,195 ▲155.57 ▼0.1090.58 ▼1.4039.61 ▼2.77
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0436.58 ▼1.6633.09 ▼1.06
Add New Post /wp-admin/post-new.php1,526 ▼223.20 ▼0.03639.49 ▼35.0754.12 ▼9.60
Media Library /wp-admin/upload.php1,400 ▼34.16 ▼0.0599.01 ▼15.3941.64 ▼5.37

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded

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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/company-autocomplete/company-autocomplete.php

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 Passed 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: woocommerce, woo, search, e-commerce, autocomplete...

company-autocomplete/company-autocomplete.php Passed 13 tests

This is the main PHP file of "Company Autocomplete by LEI Register" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
69 characters long description:
Company search autocomplete for WooCommerce using LEI data from GLEIF

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
Good job! No executable or dangerous file extensions detected98 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1322972
CSS11018
PHP14178

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin