10% wp-postcode-lookup-form

Code Review | WP Postcode Lookup Form

WordPress plugin WP Postcode Lookup Form scored10%from 54 tests.

About plugin

  • Plugin page: wp-postcode-looku...
  • Plugin version: 0.6.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.7
  • WordPress version: 6.3.1
  • First release: Dec 9, 2016
  • Latest release: Dec 30, 2016
  • Number of updates: 24
  • Update frequency: every 0.8 days
  • Top authors: rkbcomputing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,301 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
These installer errors require your attention
  • Install procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5643
    File class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.

Server metrics [RAM: ▼1.69MB] [CPU: ▼52.16ms] Passed 4 tests

Server-side resources used by WP Postcode Lookup Form
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.30 ▼1.166.95 ▼33.60
Dashboard /wp-admin2.32 ▼0.988.92 ▼41.52
Posts /wp-admin/edit.php2.32 ▼1.046.40 ▼39.94
Add New Post /wp-admin/post-new.php2.32 ▼3.577.17 ▼93.57
Media Library /wp-admin/upload.php2.32 ▼0.916.61 ▼28.40

Server storage [IO: ▲0.08MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 12 new files
Database: 2 new tables, 6 new options
New tables
wp_postcode_lookup_form_log
wp_postcode_lookup_form
New WordPress options
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by WP Postcode Lookup Form
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲19214.42 ▲0.0126.78 ▲25.1551.61 ▲3.69
Dashboard /wp-admin2,218 ▲445.63 ▲0.0998.11 ▲5.6344.62 ▲6.31
Posts /wp-admin/edit.php2,129 ▲292.00 ▼0.0044.54 ▲6.8331.52 ▼4.59
Add New Post /wp-admin/post-new.php1,408 ▼11816.79 ▼6.85564.93 ▼113.9652.29 ▼2.72
Media Library /wp-admin/upload.php1,426 ▲294.20 ▲0.0298.44 ▼1.8641.14 ▼2.96

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5643
    File class-phpmailer.php is deprecated since version 5.5.0! Use wp-includes/PHPMailer/PHPMailer.php instead. The PHPMailer class has been moved to wp-includes/PHPMailer subdirectory and now uses the PHPMailer\PHPMailer namespace.
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_postcode_lookup_form_log
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-postcode-lookup-form/options.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-postcode-lookup-form/wp-postcode-lookup-form.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-postcode-lookup-form/modules/print-csv.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes: Please take inspiration from this readme.txt

wp-postcode-lookup-form/wp-postcode-lookup-form.php 92% from 13 tests

Analyzing the main PHP file in "WP Postcode Lookup Form" version 0.6.0
Please make the necessary changes and fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 154 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,406 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP51461081,062
CSS21126185
JavaScript34774159

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.21
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%
Functions52
▷ Named functions52100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin