10% 404s

Code Review | 404s

WordPress plugin 404s scored 10% from 54 tests.

About plugin

  • Plugin page: 404s
  • Plugin version: 3.5.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-6.0
  • WordPress version: 6.3.1
  • First release: Dec 21, 2016
  • Latest release: Jun 20, 2022
  • Number of updates: 25
  • Update frequency: every 80.2 days
  • Top authors: zhuyi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,904 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > User deprecated in wp-includes/functions.php+5643
    File upgrade-functions.php is deprecated since version 2.5.0! Use wp-admin/includes/upgrade.php instead.

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

Analyzing server-side resources used by 404s
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0760.97 ▲23.72
Dashboard /wp-admin3.37 ▲0.0753.52 ▲4.60
Posts /wp-admin/edit.php3.40 ▲0.0555.27 ▲5.75
Add New Post /wp-admin/post-new.php5.95 ▲0.06100.07 ▲7.47
Media Library /wp-admin/upload.php3.29 ▲0.0641.84 ▲9.04
All 404s /wp-admin/edit.php?post_type=404s3.3242.19
Export 404s /wp-admin/edit.php?post_type=404s&page=panel404sExport3.2636.85
Settings /wp-admin/edit.php?post_type=404s&page=404settings3.2639.86
Add New /wp-admin/post-new.php?post_type=404s3.4155.14
404s /wp-admin/edit.php?post_type=404s&page=404s3.2341.28

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 12 new files
Database: 1 new table, 7 new options
New tables
wp_404s
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
tomas_404sinstalled
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for 404s
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,848 ▲11313.33 ▼0.974.74 ▲2.9938.37 ▼3.15
Dashboard /wp-admin2,254 ▲654.99 ▲0.09100.50 ▼15.6036.61 ▼7.35
Posts /wp-admin/edit.php2,137 ▲482.09 ▲0.0742.38 ▲0.3435.50 ▼0.97
Add New Post /wp-admin/post-new.php1,571 ▲3723.12 ▼0.08588.29 ▼74.5662.34 ▲6.63
Media Library /wp-admin/upload.php1,433 ▲454.23 ▲0.0197.22 ▼7.6347.15 ▲0.93
All 404s /wp-admin/edit.php?post_type=404s1,1062.0133.6630.39
Export 404s /wp-admin/edit.php?post_type=404s&page=panel404sExport8371.7125.2327.48
Settings /wp-admin/edit.php?post_type=404s&page=404settings1,2491.7224.2331.06
Add New /wp-admin/post-new.php?post_type=404s2,4187.75175.5269.78
404s /wp-admin/edit.php?post_type=404s&page=404s8541.6825.8724.81

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_404s
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • tomas_404sinstalled
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
    • > GET request to /wp-admin/edit.php?post_type=404s&page=404s
    • > Notice in wp-content/plugins/404s/404s.php+369
    Undefined variable: results_page_pagination
    • > GET request to /wp-admin/edit.php?post_type=404s&page=404s
    • > Warning in wp-content/plugins/404s/404paginate.php+33
    count(): Parameter must be an array or an object that implements Countable

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

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: redirect, webmaster tools, custom 404 page, 404 redirect, broken link...

404s/404s.php 92% from 13 tests

The primary PHP file in "404s" version 3.5.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected1,140 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP9266841,132
CSS1108

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin