90% lh-first-comment-redirect

Code Review | LH First Comment Redirect

WordPress plugin LH First Comment Redirect scored90%from 54 tests.

About plugin

  • Plugin page: lh-first-comment-...
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.1
  • WordPress version: 6.3.1
  • First release: Oct 9, 2020
  • Latest release: Nov 7, 2022
  • Number of updates: 7
  • Update frequency: every 108.7 days
  • Top authors: shawfactor (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /420 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼6.75ms] Passed 4 tests

Analyzing server-side resources used by LH First Comment Redirect
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0239.12 ▼1.04
Dashboard /wp-admin3.34 ▼0.0151.54 ▼12.13
Posts /wp-admin/edit.php3.39 ▲0.0347.31 ▲1.48
Add New Post /wp-admin/post-new.php5.91 ▲0.0394.72 ▼5.46
Media Library /wp-admin/upload.php3.26 ▲0.0334.46 ▼8.35

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for LH First Comment Redirect
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.25 ▼1.181.88 ▼0.0140.91 ▲2.66
Dashboard /wp-admin2,203 ▲124.83 ▼0.0395.90 ▼8.6837.95 ▼3.32
Posts /wp-admin/edit.php2,089 ▼32.04 ▲0.0136.57 ▼5.9733.79 ▲0.39
Add New Post /wp-admin/post-new.php1,542 ▲2318.58 ▼4.68603.16 ▼96.4473.71 ▲17.73
Media Library /wp-admin/upload.php1,388 ▼04.19 ▼0.2498.83 ▼18.9140.70 ▼5.64

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
5 plugin tags: subscribe, comment, links, comment-redirect, redirect

lh-first-comment-redirect/lh-first-comment-redirect.php 92% from 13 tests

The principal PHP file in "LH First Comment Redirect" v. 1.01 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin115 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP29920115

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity13.00
▷ Minimum class complexity13.00
▷ Maximum class complexity13.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods750.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected