94% wp-edit-redirect

Code Review | WP Edit Redirect

WordPress plugin WP Edit Redirect scored 94% from 54 tests.

About plugin

  • Plugin page: wp-edit-redirect
  • Plugin version: 1.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3.2
  • WordPress version: 5.8.1
  • First release: Feb 3, 2020
  • Latest release: Feb 4, 2020
  • Number of updates: 7
  • Update frequency: every 0.6 days
  • Top authors: daltonsutton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 217 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

An overview of server-side resources used by WP Edit Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0134.30 ▼4.47
Dashboard /wp-admin3.07 ▲0.0143.39 ▼7.50
Posts /wp-admin/edit.php3.12 ▲0.0137.81 ▼9.42
Add New Post /wp-admin/post-new.php5.42 ▼0.0190.82 ▼565.27
Media Library /wp-admin/upload.php3.01 ▲0.0137.78 ▲4.47

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, no new options

Browser metrics Passed 4 tests

WP Edit Redirect: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲8316.27 ▲0.857.59 ▼1.6450.87 ▼1.94
Dashboard /wp-admin2,967 ▲335.92 ▼0.12145.90 ▼9.55125.73 ▲14.25
Posts /wp-admin/edit.php2,739 ▼02.69 ▼0.0070.29 ▼0.56100.69 ▲4.69
Add New Post /wp-admin/post-new.php1,683 ▼018.84 ▲0.08380.20 ▼4.03115.66 ▲2.85
Media Library /wp-admin/upload.php1,807 ▼05.01 ▼0.01169.41 ▲6.00118.06 ▼0.28

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 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)
Even though no errors were found, this is by no means 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
Please 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_filter() in wp-content/plugins/wp-edit-redirect/wp-edit-redirect.php:36

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 Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: redirect, post, page, edit, admin

wp-edit-redirect/wp-edit-redirect.php Passed 13 tests

The entry point to "WP Edit Redirect" version 1.4 is a PHP file that has certain tags in its header comment area
130 characters long description:
Add "/wp-edit/" to the end of a page or post URL to redirect to the admin. Quick access to the backend to make changes on the fly!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected28 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1132628

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.19
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%
Functions4
▷ Named functions4100.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
There were not PNG files found in your plugin