84% redirect-to-latest-post-in-category

Code Review | Redirect to Category Latest Post

WordPress plugin Redirect to Category Latest Post scored84%from 54 tests.

About plugin

  • Plugin page: redirect-to-lates...
  • Plugin version: 0.2.2
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 6, 2019
  • Latest release: Aug 6, 2019
  • Number of updates: 4
  • Update frequency: every 40.7 days
  • Top authors: emma2334 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /555 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.25MB] [CPU: ▼20.94ms] Passed 4 tests

Analyzing server-side resources used by Redirect to Category Latest Post
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.77 ▼0.6914.35 ▼24.14
Dashboard /wp-admin3.31 ▼0.0344.71 ▼14.84
Posts /wp-admin/edit.php3.07 ▼0.2826.45 ▼24.22
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.73 ▼20.55
Media Library /wp-admin/upload.php3.23 ▲0.0135.20 ▲1.94

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Redirect to Category Latest Post
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.56 ▼0.841.70 ▲0.0541.29 ▼1.19
Dashboard /wp-admin2,206 ▲215.85 ▼0.02108.09 ▼11.0238.09 ▼10.48
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0038.93 ▲0.4536.12 ▲0.21
Add New Post /wp-admin/post-new.php1,514 ▼1417.87 ▼0.42650.69 ▲49.0556.78 ▲5.58
Media Library /wp-admin/upload.php1,391 ▲34.30 ▲0.0894.73 ▼1.6641.21 ▼1.72

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
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts

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 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/redirect-to-latest-post-in-category/includes/redirect.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/redirect-to-latest-post-in-category/includes/redirect.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/redirect-to-latest-post-in-category/includes/menu-field.php:8

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 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Screenshot #1 ([https://i.imgur.com/jh4X8Hs.png How it looks on admin page.]) image required
Please take inspiration from this readme.txt

redirect-to-latest-post-in-category/redirect-to-category-latest-post.php 92% from 13 tests

The main file in "Redirect to Category Latest Post" v. 0.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("redirect-to-latest-post-in-category.php" instead of "redirect-to-category-latest-post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin106 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3391999
Markdown1607

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity5.67
▷ Minimum class complexity3.00
▷ Maximum class complexity7.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods9
▷ Static methods666.67%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin