84% postname-permalink-auto-redirect

Code Review | Postname Permalink Auto Redirect

WordPress plugin Postname Permalink Auto Redirect scored84%from 54 tests.

About plugin

  • Plugin page: postname-permalin...
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.0-4.7.4
  • WordPress version: 6.3.1
  • First release: Oct 15, 2015
  • Latest release: May 10, 2017
  • Number of updates: 19
  • Update frequency: every 30.2 days
  • Top authors: fabioneves (100%)

Code review

54 tests

User reviews

16 reviews

Install metrics

1,000+ active /12,627 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

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

This is a short check of server-side resources used by Postname Permalink Auto Redirect
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0138.01 ▼0.28
Dashboard /wp-admin3.31 ▼0.0345.59 ▼15.18
Posts /wp-admin/edit.php3.36 ▲0.0147.14 ▼1.26
Add New Post /wp-admin/post-new.php5.89 ▲0.0189.60 ▼16.68
Media Library /wp-admin/upload.php3.23 ▲0.0134.68 ▼0.72

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Postname Permalink Auto Redirect
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.24 ▼0.931.79 ▲0.1243.73 ▲5.39
Dashboard /wp-admin2,203 ▲124.83 ▼1.2598.94 ▼11.1336.51 ▼6.52
Posts /wp-admin/edit.php2,092 ▼02.00 ▼0.0539.83 ▼2.0434.90 ▲0.06
Add New Post /wp-admin/post-new.php1,533 ▼023.35 ▲0.32601.57 ▼86.8049.78 ▼7.00
Media Library /wp-admin/upload.php1,391 ▲34.16 ▼0.0697.05 ▼3.2842.43 ▼0.51

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× 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/postname-permalink-auto-redirect/postname-permalink-auto-redirect.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% 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
These attributes need to be fixed:
  • Tags: There are too many tags (24 tag instead of maximum 10)
The official readme.txt might help

postname-permalink-auto-redirect/postname-permalink-auto-redirect.php Passed 13 tests

"Postname Permalink Auto Redirect" version 1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
80 characters long description:
Automatically redirects (301) when you change permalinks from 'postname' format.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected39 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1122839

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.53
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected