84% 404-solution

Code Review | 404 Solution

WordPress plugin 404 Solution scored 84% from 54 tests.

About plugin

  • Plugin page: 404-solution
  • Plugin version: 2.30.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.9
  • WordPress version: 5.9.2
  • First release: Mar 5, 2017
  • Latest release: Mar 31, 2022
  • Number of updates: 458
  • Update frequency: every 4.0 days
  • Top authors: aaron13100 (100%)

Code review

54 tests

User reviews

29 reviews

Install metrics

4,000+ active / 482,762 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲1.11MB] [CPU: ▼292.34ms] Passed 4 tests

This is a short check of server-side resources used by 404 Solution
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.0772.13 ▲5.52
Dashboard /wp-admin4.91 ▲1.5154.53 ▲13.54
Posts /wp-admin/edit.php5.12 ▲1.4761.52 ▲6.05
Add New Post /wp-admin/post-new.php8.38 ▲1.41120.32 ▼1,190.49
Media Library /wp-admin/upload.php4.78 ▲1.4946.42 ▲9.58
404 Solution /wp-admin/options-general.php?page=abj404_solution4.8049.40

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 101 new files
Database: 5 new tables, no new options
New tables
wp_abj404_permalink_cache
wp_abj404_spelling_cache
wp_abj404_lookup
wp_abj404_redirects
wp_abj404_logsv2

Browser metrics Passed 4 tests

A check of browser resources used by 404 Solution
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,867 ▲11215.86 ▲0.3611.57 ▲4.024.88 ▲1.15
Dashboard /wp-admin2,959 ▲406.43 ▲0.06183.56 ▼56.56195.22 ▼10.90
Posts /wp-admin/edit.php2,723 ▲53.44 ▲0.0287.19 ▼2.81180.22 ▼11.50
Add New Post /wp-admin/post-new.php1,665 ▼4916.67 ▲0.89635.31 ▼30.68219.12 ▲1.85
Media Library /wp-admin/upload.php1,735 ▲55.69 ▼0.04193.49 ▼8.38255.09 ▲11.03
404 Solution /wp-admin/options-general.php?page=abj404_solution1,9163.7594.66240.48

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie tables detected upon uninstall: 5 tables
    • wp_abj404_redirects
    • wp_abj404_lookup
    • wp_abj404_permalink_cache
    • wp_abj404_spelling_cache
    • wp_abj404_logsv2

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > 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: Call to undefined function plugin_dir_path() in wp-content/plugins/404-solution/404-solution.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/404-solution/includes/Loader.php:6
    • > 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:230

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: 301, 302, temporary redirect, error, permanent redirect...

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

Analyzing the main PHP file in "404 Solution" version 2.30.7
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 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin11,019 lines of code in 92 files:
LanguageFilesBlank linesComment linesLines of code
PHP281,9941,7578,030
Markdown242101,073
JavaScript8120170642
HTML219118608
SQL31160113449
CSS12016172
JSON10045

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity52.31
▷ Minimum class complexity1.00
▷ Maximum class complexity369.00
Average method complexity4.83
▷ Minimum method complexity1.00
▷ Maximum method complexity82.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes26
▷ Abstract classes13.85%
▷ Concrete classes2596.15%
▷ Final classes00.00%
Methods356
▷ Static methods5415.17%
▷ Public methods34396.35%
▷ Protected methods00.00%
▷ Private methods133.65%
Functions9
▷ Named functions888.89%
▷ Anonymous functions111.11%
Constants40
▷ Global constants3075.00%
▷ Class constants1025.00%
▷ Public constants10100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin