90% postcode-redirect

Code Review | Postcode Redirect

WordPress plugin Postcode Redirect scored90%from 54 tests.

About plugin

  • Plugin page: postcode-redirect
  • Plugin version: 5.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.8-6.3
  • WordPress version: 6.3.1
  • First release: Dec 16, 2020
  • Latest release: Aug 13, 2023
  • Number of updates: 67
  • Update frequency: every 14.5 days
  • Top authors: paulio21 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,806 total downloads


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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.85ms] Passed 4 tests

This is a short check of server-side resources used by Postcode Redirect
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0542.63 ▲7.59
Dashboard /wp-admin3.35 ▲0.0441.50 ▼4.77
Posts /wp-admin/edit.php3.40 ▲0.0445.99 ▼8.73
Add New Post /wp-admin/post-new.php5.93 ▲0.0486.17 ▼7.63
Media Library /wp-admin/upload.php3.27 ▲0.0431.87 ▼2.27

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 13 new options
New WordPress options

Browser metrics Passed 4 tests

Postcode Redirect: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲12513.46 ▼0.897.67 ▲6.0737.19 ▼4.65
Dashboard /wp-admin2,206 ▲265.64 ▼0.0082.77 ▼9.7470.75 ▲29.58
Posts /wp-admin/edit.php2,111 ▲111.98 ▼0.0538.31 ▲1.6535.79 ▲1.45
Add New Post /wp-admin/post-new.php1,566 ▲4018.08 ▼5.35642.96 ▼35.48112.76 ▲51.64
Media Library /wp-admin/upload.php1,411 ▲114.18 ▼0.0195.03 ▼3.5980.11 ▲35.14

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin does not fully uninstall, leaving 13 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • pr_postcodes1
    • pr_wrong
    • pr_wait
    • pr_postcodes2
    • pr_ask
    • widget_recent-posts
    • db_upgraded
    • pr_use
    • ...

Smoke tests Passed 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)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
7 plugin tags: local, website, url, redirect, tradesmen...

postcode-redirect/postcoderedirect.php 92% from 13 tests

The main PHP script in "Postcode Redirect" version 5.0.0 is automatically included on every request by WordPress
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("postcode-redirect.php" instead of "postcoderedirect.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Everything looks great! No dangerous files found in this plugin316 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity9.00
▷ Minimum class complexity9.00
▷ Maximum class complexity9.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG images were found in this plugin