74% gf-forms-uk-address-format

Code Review | GF Forms - UK address format

WordPress plugin GF Forms - UK address format scored 74% from 54 tests.

About plugin

  • Plugin page: gf-forms-uk-addre...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.75
  • WordPress version: 6.3.1
  • First release: Jun 26, 2014
  • Latest release: May 17, 2017
  • Number of updates: 6
  • Update frequency: every 176.2 days
  • Top authors: pigeonhut (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 15,863 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by GF Forms - UK address format
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.87 ▼4.18
Dashboard /wp-admin3.31 ▲0.0145.55 ▼8.73
Posts /wp-admin/edit.php3.36 ▲0.0046.59 ▲0.03
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.64 ▲2.71
Media Library /wp-admin/upload.php3.23 ▲0.0035.28 ▲1.88

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for GF Forms - UK address format
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.17 ▼1.181.67 ▼0.2237.75 ▼6.24
Dashboard /wp-admin2,206 ▲184.87 ▼0.02107.93 ▼10.2935.61 ▼10.64
Posts /wp-admin/edit.php2,089 ▼01.97 ▼0.0039.54 ▲1.6834.75 ▲0.08
Add New Post /wp-admin/post-new.php1,535 ▲122.95 ▼0.12663.36 ▼9.3657.98 ▼3.24
Media Library /wp-admin/upload.php1,385 ▼34.29 ▲0.1198.05 ▼8.3444.45 ▼2.15

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method GfUk::uninstall() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/gf-forms-uk-address-format/gf-uk.php:191

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)
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:
  • Donate link: Invalid URI ("")
The official readme.txt might help

gf-forms-uk-address-format/gf-uk.php 92% from 13 tests

Analyzing the main PHP file in "GF Forms - UK address format" version 1.0.2
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("gf-forms-uk-address-format.php" instead of "gf-uk.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin137 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22567137

PHP code Passed 2 tests

This is a short overview 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.13
Average class complexity4.00
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.55
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods11
▷ Static methods218.18%
▷ Public methods872.73%
▷ Protected methods00.00%
▷ Private methods327.27%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

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