84% 404-to-home

Code Review | 404 to Home

WordPress plugin 404 to Home scored84%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: 6.3.1
  • 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 /8,823 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

This is a short check of server-side resources used by 404 to Home
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.81 ▼7.08
Dashboard /wp-admin3.31 ▲0.0048.89 ▼5.47
Posts /wp-admin/edit.php3.36 ▲0.0051.55 ▼11.05
Add New Post /wp-admin/post-new.php5.89 ▲0.0096.06 ▼7.01
Media Library /wp-admin/upload.php3.24 ▲0.0039.94 ▲2.11

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

404 to Home: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.23 ▼0.121.55 ▼0.4046.17 ▼1.28
Dashboard /wp-admin2,195 ▲185.58 ▼0.0290.85 ▲0.2938.50 ▼2.35
Posts /wp-admin/edit.php2,100 ▼31.94 ▼0.0841.31 ▼3.3035.45 ▼2.93
Add New Post /wp-admin/post-new.php1,527 ▲123.10 ▲0.08654.59 ▼51.8564.29 ▼0.06
Media Library /wp-admin/upload.php1,403 ▲34.23 ▲0.0698.32 ▼21.3843.13 ▼5.85

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

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

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === 404-to-home === )
Please take inspiration from this readme.txt

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

This is the main PHP file of "404 to Home" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Name the main plugin file 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 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin7 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP15137

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
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

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin