78% uk-address-postcode-validation

Code Review | UK Address Postcode Validation

WordPress plugin UK Address Postcode Validation scored78%from 54 tests.

About plugin

  • Plugin page: uk-address-postco...
  • Plugin version: 3.4.1
  • PHP compatiblity: 7.4.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-7.4
  • WordPress version: 6.3.1
  • First release: Jun 3, 2020
  • Latest release: Sep 26, 2023
  • Number of updates: 34
  • Update frequency: every 36.2 days
  • Top authors: idealpostcodes (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

400+ active /7,901 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼12.69ms] Passed 4 tests

Analyzing server-side resources used by UK Address Postcode Validation
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0142.32 ▼0.65
Dashboard /wp-admin3.32 ▼0.0348.45 ▼13.72
Posts /wp-admin/edit.php3.37 ▲0.0141.90 ▼12.03
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.34 ▼20.92
Media Library /wp-admin/upload.php3.24 ▲0.0134.06 ▼4.10

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by UK Address Postcode Validation
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.34 ▼0.111.82 ▲0.1744.80 ▲5.16
Dashboard /wp-admin2,198 ▲245.63 ▲0.0483.71 ▼9.6139.98 ▼7.72
Posts /wp-admin/edit.php2,100 ▼02.05 ▼0.0035.52 ▼4.7733.07 ▼3.89
Add New Post /wp-admin/post-new.php1,545 ▲1423.15 ▼0.17675.10 ▲39.1452.12 ▼10.10
Media Library /wp-admin/upload.php1,403 ▼04.25 ▲0.0097.23 ▼5.4443.38 ▼3.51

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 were found after uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

SRP 0% 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 fix the following
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/uk-address-postcode-validation/uk-address-postcode-validation.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Integration' not found in wp-content/plugins/uk-address-postcode-validation/classes/ideal.postcodes.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/uk-address-postcode-validation/wp/menu.php:10

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

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
7 plugin tags: search, data, address, validation, paf...

uk-address-postcode-validation/uk-address-postcode-validation.php 85% from 13 tests

"UK Address Postcode Validation" version 3.4.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Requires at least: The required version number must match the one declared in readme.txt ("5.0" instead of "5.0.0")

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
Success! There were no dangerous files found in this plugin494 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP42657403
CSS17087
JavaScript42204

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity5.50
▷ Minimum class complexity2.00
▷ Maximum class complexity9.00
Average method complexity1.54
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods00.00%
▷ Public methods964.29%
▷ Protected methods00.00%
▷ Private methods535.71%
Functions4
▷ Named functions125.00%
▷ Anonymous functions375.00%
Constants4
▷ Global constants4100.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
No PNG files were detected