84% last-post-redirect

Code Review | Last Post Redirect

WordPress plugin Last Post Redirect scored84%from 54 tests.

About plugin

  • Plugin page: last-post-redirect
  • Plugin version: 1.5.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 6.3.1
  • First release: Jan 17, 2014
  • Latest release: Mar 18, 2014
  • Number of updates: 56
  • Update frequency: every 1.1 days
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,863 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

Analyzing server-side resources used by Last Post Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0043.75 ▲0.66
Dashboard /wp-admin3.32 ▼0.0355.55 ▼13.37
Posts /wp-admin/edit.php3.37 ▲0.0147.45 ▼3.34
Add New Post /wp-admin/post-new.php5.90 ▲0.0183.05 ▼21.56
Media Library /wp-admin/upload.php3.24 ▲0.0137.99 ▲0.91
Last Post Redirect /wp-admin/options-general.php?page=last-post-redirect-options3.2134.50

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 11 new files
Database: no new tables, 10 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
last_post_redirect_get_name
widget_theysaidso_widget
can_compress_scripts
last_post_redirect_post_type
widget_recent-comments
last_post_redirect_post_status
last_post_redirect_way
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Last Post Redirect
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲2214.35 ▼0.041.70 ▼0.6543.42 ▼1.28
Dashboard /wp-admin2,199 ▲195.63 ▼0.0392.11 ▼6.9640.95 ▼2.34
Posts /wp-admin/edit.php2,104 ▲11.95 ▼0.0534.11 ▼0.8632.79 ▼2.73
Add New Post /wp-admin/post-new.php1,531 ▼1923.18 ▲5.03674.08 ▲22.8157.83 ▼15.77
Media Library /wp-admin/upload.php1,401 ▲44.15 ▼0.0396.82 ▼9.0743.91 ▼0.38
Last Post Redirect /wp-admin/options-general.php?page=last-post-redirect-options9052.0322.8730.74

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 10 options in the database
    • db_upgraded
    • last_post_redirect_get_name
    • theysaidso_admin_options
    • last_post_redirect_post_type
    • widget_recent-posts
    • last_post_redirect_way
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • last_post_redirect_post_status

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 take a closer look at the following
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/last-post-redirect/last-post-redirect.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/last-post-redirect/options.php:12

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: post, redirect

last-post-redirect/last-post-redirect.php Passed 13 tests

The main file in "Last Post Redirect" v. 1.5.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
Redirect you to the latest post of your blog by a direct link.

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
Good job! No executable or dangerous file extensions detected244 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP22325131
PO File23838113

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions10
▷ Named functions10100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG images were found in this plugin