89% first-comment-redirect

Code Review | First Comment Redirect

WordPress plugin First Comment Redirect scored89%from 54 tests.

About plugin

  • Plugin page: first-comment-red...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.0
  • WordPress version: 6.3.1
  • First release: Sep 30, 2013
  • Latest release: Nov 7, 2014
  • Number of updates: 12
  • Update frequency: every 33.6 days
  • Top authors: robin90 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /4,018 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
Install script ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼8.67ms] Passed 4 tests

This is a short check of server-side resources used by First Comment Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0839.78 ▲3.89
Dashboard /wp-admin3.38 ▲0.0344.95 ▼16.10
Posts /wp-admin/edit.php3.44 ▲0.0846.61 ▲1.19
Add New Post /wp-admin/post-new.php5.96 ▲0.0781.37 ▼22.93
Media Library /wp-admin/upload.php3.31 ▲0.0837.00 ▲3.17

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for First Comment Redirect
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲4414.35 ▲0.181.74 ▼0.0636.80 ▼3.88
Dashboard /wp-admin2,211 ▲315.62 ▼0.1089.37 ▼2.1038.66 ▼5.05
Posts /wp-admin/edit.php2,116 ▲162.02 ▼0.0139.16 ▲2.5336.24 ▼2.72
Add New Post /wp-admin/post-new.php1,541 ▲1323.16 ▲0.26677.26 ▼26.3059.08 ▼0.21
Media Library /wp-admin/upload.php1,410 ▲104.19 ▼0.0495.70 ▼19.2144.70 ▼2.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • section_general
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (First Comment Redirect Settings Page) image required
You can take inspiration from this readme.txt

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

"First Comment Redirect" version 1.0.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 333 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected305 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP249255260
PO File1131545

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity15.00
▷ Minimum class complexity6.00
▷ Maximum class complexity24.00
Average method complexity2.40
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods210.00%
▷ Public methods1575.00%
▷ Protected methods00.00%
▷ Private methods525.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png11.33KB6.50KB▼ 42.65%