89% forum-redirect

Code Review | Forum Redirect

WordPress plugin Forum Redirect scored89%from 54 tests.

About plugin

  • Plugin page: forum-redirect
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.3.2
  • WordPress version: 6.3.1
  • First release: Feb 13, 2020
  • Latest release: Feb 13, 2020
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: evertiro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,043 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 gracefully, with no errors

Server metrics [RAM: ▼0.13MB] [CPU: ▼7.17ms] Passed 4 tests

An overview of server-side resources used by Forum Redirect
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.86 ▼0.6027.59 ▼17.33
Dashboard /wp-admin3.34 ▲0.0347.04 ▼5.97
Posts /wp-admin/edit.php3.39 ▲0.0351.67 ▲2.98
Add New Post /wp-admin/post-new.php5.92 ▲0.0486.36 ▼4.90
Media Library /wp-admin/upload.php3.26 ▲0.0336.25 ▼0.47

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Forum Redirect
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,445 ▼31614.16 ▼0.190.51 ▼1.2718.55 ▼25.71
Dashboard /wp-admin2,195 ▲275.57 ▲0.0388.36 ▼16.1343.37 ▼3.60
Posts /wp-admin/edit.php2,100 ▼01.97 ▲0.0237.25 ▲0.8433.10 ▼0.64
Add New Post /wp-admin/post-new.php1,534 ▲618.10 ▼5.24637.56 ▼72.4682.88 ▲10.44
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.0197.65 ▼6.6348.81 ▲3.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

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

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% 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: buddypress, redirect, bbpress, forums, forum

forum-redirect/class-forum-redirect.php 77% from 13 tests

The primary PHP file in "Forum Redirect" version 1.0.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Main file name: The principal plugin file should be the same as the plugin slug ("forum-redirect.php" instead of "class-forum-redirect.php")
  • Domain Path: The domain path must begin with a forward slash character ("/languages")

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
Good job! No executable or dangerous file extensions detected131 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP355154127
Markdown1204

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.29
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes1100.00%
Methods7
▷ Static methods114.29%
▷ Public methods457.14%
▷ Protected methods00.00%
▷ Private methods342.86%
Functions6
▷ Named functions6100.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 files were detected