74% redirect-and-log

Code Review | Redirect and Log

WordPress plugin Redirect and Log scored74%from 54 tests.

About plugin

  • Plugin page: redirect-and-log
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.2
  • WordPress version: 6.3.1
  • First release: May 26, 2015
  • Latest release: May 26, 2015
  • Number of updates: 4
  • Update frequency: every 1.5 days
  • Top authors: sgrant (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /657 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Redirect and Log
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.81 ▼2.35
Dashboard /wp-admin3.31 ▲0.0144.85 ▲1.23
Posts /wp-admin/edit.php3.36 ▲0.0147.15 ▼2.04
Add New Post /wp-admin/post-new.php5.89 ▲0.01100.12 ▲11.14
Media Library /wp-admin/upload.php3.23 ▲0.0137.31 ▲3.20

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: 1 new table, 6 new options
New tables
wp_redirect_and_log
New WordPress options
widget_theysaidso_widget
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Redirect and Log: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.62 ▼1.161.59 ▼0.3541.27 ▲0.11
Dashboard /wp-admin2,200 ▲94.88 ▼1.02116.47 ▼1.2643.20 ▼0.55
Posts /wp-admin/edit.php2,092 ▲62.04 ▲0.0541.35 ▲3.9634.64 ▲2.59
Add New Post /wp-admin/post-new.php6,461 ▲4,91920.23 ▲1.24996.61 ▲385.5258.41 ▲2.55
Media Library /wp-admin/upload.php1,382 ▼04.21 ▼0.02100.71 ▲3.9642.60 ▼1.84

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_redirect_and_log
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/redirect-and-log/redirect-and-log.php:34

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: log, redirect

redirect-and-log/redirect-and-log.php Passed 13 tests

The principal PHP file in "Redirect and Log" v. 1.0 is loaded by WordPress automatically on each request
64 characters long description:
Set up simple WordPress redirects and log visits to the database

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin82 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1262982

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity6.00
▷ Minimum class complexity6.00
▷ Maximum class complexity6.00
Average method complexity1.71
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.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
There were not PNG files found in your plugin