84% 404page

Code Review | Smart Custom 404 error page [404page]

WordPress plugin Smart Custom 404 error page [404page] scored84%from 54 tests.

About plugin

  • Plugin page: 404page
  • Plugin version: 11.4.4
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Sep 30, 2013
  • Latest release: Oct 5, 2023
  • Number of updates: 134
  • Update frequency: every 27.3 days
  • Top authors: petersplugins (78.36%)smartware.cc (22.39%)

Code review

54 tests

User reviews

1178 reviews

Install metrics

100,000+ active /2,146,697 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▼5.65ms] Passed 4 tests

Server-side resources used by Smart Custom 404 error page [404page]
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1140.96 ▲1.17
Dashboard /wp-admin3.43 ▲0.1346.89 ▼4.66
Posts /wp-admin/edit.php3.48 ▲0.1243.97 ▼5.70
Add New Post /wp-admin/post-new.php5.95 ▲0.0683.27 ▼11.45
Media Library /wp-admin/upload.php3.35 ▲0.1236.14 ▼0.78
404 Error Page /wp-admin/themes.php?page=404pagesettings3.3335.63

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
404page_data
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by Smart Custom 404 error page [404page]
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.59 ▼0.792.16 ▲0.5447.65 ▲5.88
Dashboard /wp-admin2,210 ▲185.84 ▲0.91110.24 ▲3.7742.30 ▲1.56
Posts /wp-admin/edit.php2,093 ▲72.03 ▲0.0235.30 ▲1.6431.67 ▼2.29
Add New Post /wp-admin/post-new.php6,353 ▲4,83327.64 ▲4.27911.89 ▲280.4759.57 ▲7.92
Media Library /wp-admin/upload.php1,395 ▲74.30 ▲0.0695.12 ▼1.8541.64 ▲0.70
404 Error Page /wp-admin/themes.php?page=404pagesettings1,0061.9430.6133.75

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments
    • 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
Almost there! Just fix the following items
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_SubClass' not found in wp-content/plugins/404page/inc/ppf/ppf-settings.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_Class' not found in wp-content/plugins/404page/inc/ppf/ppf-subclass.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_Plugin' not found in wp-content/plugins/404page/inc/ppf/ppf-plugin-addon.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_SubClass' not found in wp-content/plugins/404page/inc/ppf/ppf-admin.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_Class' not found in wp-content/plugins/404page/inc/ppf/ppf-plugin.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 21 tag instead of maximum 10
The official readme.txt is a good inspiration

404page/404page.php Passed 13 tests

"Smart Custom 404 error page [404page]" version 11.4.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
114 characters long description:
Custom 404 the easy way! Set any page as custom 404 error page. No coding needed. Works with (almost) every Theme.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin2,090 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP211,3481,5381,578
CSS3603315
JavaScript66430168
JSON10024
SVG5005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity20.50
▷ Minimum class complexity1.00
▷ Maximum class complexity135.00
Average method complexity2.60
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes650.00%
▷ Concrete classes650.00%
▷ Final classes00.00%
Methods140
▷ Static methods10.71%
▷ Public methods12589.29%
▷ Protected methods53.57%
▷ Private methods107.14%
Functions20
▷ Named functions1050.00%
▷ Anonymous functions1050.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
6 PNG files occupy 0.27MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/videos/404page_advanced_410_trashed_objects.png30.50KB12.48KB▼ 59.08%
assets/img/videos/404page_advanced_url_guessing.png39.22KB16.46KB▼ 58.04%
assets/img/videos/404page-brief-intro.png40.19KB16.32KB▼ 59.39%
assets/img/videos/404page_advanced_compatibility_mode.png32.29KB13.39KB▼ 58.54%
assets/img/videos/404page-advanced-settings-quick-overview.png91.10KB42.95KB▼ 52.85%