94% 404-to-home

Code Review | 404 to Home

WordPress plugin 404 to Home scored 94% from 54 tests.

About plugin

  • Plugin page: 404-to-home
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 1.5.0-4.7
  • WordPress version: 5.9.2
  • First release: Dec 7, 2016
  • Latest release: Dec 19, 2016
  • Number of updates: 2
  • Update frequency: every 3.0 days
  • Top authors: burakkaptan (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active / 7,920 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.00MB] [CPU: ▼282.92ms] Passed 4 tests

This is a short check of server-side resources used by 404 to Home
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /4.21 ▲0.0160.51 ▲7.95
Dashboard /wp-admin4.04 ▲0.0041.37 ▲0.57
Posts /wp-admin/edit.php4.33 ▲0.0059.42 ▲18.03
Add New Post /wp-admin/post-new.php7.57 ▼0.03103.52 ▼1,158.23
Media Library /wp-admin/upload.php3.98 ▲0.0054.61 ▲23.06

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for 404 to Home
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,795 ▲5115.89 ▲0.115.75 ▼0.752.79 ▲0.65
Dashboard /wp-admin2,895 ▲356.14 ▲0.12118.29 ▼5.83163.71 ▼0.38
Posts /wp-admin/edit.php2,694 ▲33.22 ▼0.0168.03 ▼1.18135.04 ▼19.82
Add New Post /wp-admin/post-new.php1,661 ▲316.48 ▼4.00453.06 ▲3.46174.85 ▲11.50
Media Library /wp-admin/upload.php1,698 ▼05.52 ▼0.00152.01 ▲11.39201.03 ▲10.24

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/404-to-home/404tohome.php:19

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)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === 404-to-home === )
You can look at the official readme.txt

404-to-home/404tohome.php 92% from 13 tests

The principal PHP file in "404 to Home" v. 1.0 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("404-to-home.php" instead of "404tohome.php")

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
No dangerous file extensions were detected7 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15137

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.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
PNG images were not found in this plugin