74% 404-solution

Code Review | 404 Solution

WordPress plugin 404 Solution scored74%from 54 tests.

About plugin

  • Plugin page: 404-solution
  • Plugin version: 2.35.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-6.4
  • WordPress version: 6.3.1
  • First release: Mar 5, 2017
  • Latest release: Nov 9, 2023
  • Number of updates: 498
  • Update frequency: every 4.9 days
  • Top authors: aaron13100 (100%)

Code review

54 tests

User reviews

36 reviews

Install metrics

10,000+ active /617,744 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.21MB] [CPU: ▲9.72ms] Passed 4 tests

Server-side resources used by 404 Solution
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.25 ▼9.23
Dashboard /wp-admin4.92 ▲1.6164.51 ▲13.53
Posts /wp-admin/edit.php5.01 ▲1.6667.24 ▲23.40
Add New Post /wp-admin/post-new.php7.50 ▲1.61102.29 ▲11.19
Media Library /wp-admin/upload.php4.82 ▲1.5961.35 ▲25.53
404 Solution /wp-admin/options-general.php?page=abj404_solution4.8556.97

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 105 new files
Database: 5 new tables, 6 new options
New tables
wp_abj404_spelling_cache
wp_abj404_permalink_cache
wp_abj404_logsv2
wp_abj404_lookup
wp_abj404_redirects
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for 404 Solution
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲5714.21 ▼0.551.88 ▲0.1138.93 ▼5.61
Dashboard /wp-admin2,196 ▲225.57 ▲0.0396.21 ▼9.9541.88 ▼0.47
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.1439.51 ▲0.8135.35 ▲1.28
Add New Post /wp-admin/post-new.php1,529 ▲223.10 ▼0.02606.89 ▼46.0046.75 ▼7.18
Media Library /wp-admin/upload.php1,401 ▼24.21 ▲0.04100.09 ▼6.2045.42 ▲2.16
404 Solution /wp-admin/options-general.php?page=abj404_solution1,4452.2150.2047.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables detected upon uninstall: 5 tables
    • wp_abj404_logsv2
    • wp_abj404_redirects
    • wp_abj404_lookup
    • wp_abj404_permalink_cache
    • wp_abj404_spelling_cache
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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
Please take a closer look at the following
  • 6× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/404-solution/404-solution.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'ABJ_404_Solution_Functions' not found in wp-content/plugins/404-solution/includes/php/FunctionsPreg.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/404-solution/includes/ShortCode.php:231
    • > PHP Fatal error
      Uncaught Error: Class 'ABJ_404_Solution_Functions' not found in wp-content/plugins/404-solution/includes/php/FunctionsMBString.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'wpdb' not found in wp-content/plugins/404-solution/includes/php/wordpress/WPDBExtension.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/404-solution/includes/Loader.php:6

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
10 plugin tags: temporary redirect, page not found, 301, permalink, error...

404-solution/404-solution.php Passed 13 tests

The main PHP script in "404 Solution" version 2.35.6 is automatically included on every request by WordPress
137 characters long description:
Creates automatic redirects for 404 traffic and page suggestions when matches are not found providing better service to your web visitors

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin11,879 lines of code in 96 files:
LanguageFilesBlank linesComment linesLines of code
PHP292,1121,8908,617
Markdown249501,259
JavaScript8121170649
HTML2210219639
SQL33182125495
CSS12116175
JSON10045

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity53.61
▷ Minimum class complexity2.00
▷ Maximum class complexity422.00
Average method complexity5.04
▷ Minimum method complexity1.00
▷ Maximum method complexity87.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes13.57%
▷ Concrete classes2796.43%
▷ Final classes00.00%
Methods373
▷ Static methods5615.01%
▷ Public methods35996.25%
▷ Protected methods00.00%
▷ Private methods143.75%
Functions10
▷ Named functions880.00%
▷ Anonymous functions220.00%
Constants42
▷ Global constants3071.43%
▷ Class constants1228.57%
▷ Public constants12100.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
There are no PNG files in this plugin