73% nomore404-404-redirection-and-firewall

Code Review | Nomore404 404 Redirection and Firewall

WordPress plugin Nomore404 404 Redirection and Firewall scored 73% from 54 tests.

About plugin

  • Plugin page: nomore404-404-red...
  • Plugin version: 2.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.5
  • WordPress version: 5.8.1
  • First release: Dec 31, 2019
  • Latest release: Feb 25, 2021
  • Number of updates: 36
  • Update frequency: every 11.7 days
  • Top authors: devoutpro (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 534 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.05MB] [CPU: ▼140.45ms] Passed 4 tests

Analyzing server-side resources used by Nomore404 404 Redirection and Firewall
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1536.68 ▲15.49
Dashboard /wp-admin3.10 ▲0.0444.70 ▲3.27
Posts /wp-admin/edit.php3.21 ▲0.1044.80 ▼0.73
Add New Post /wp-admin/post-new.php5.46 ▲0.0279.17 ▼567.67
Media Library /wp-admin/upload.php3.04 ▲0.0434.14 ▲3.32
NoMore404 /wp-admin/options-general.php?page=nomore4043.0231.87

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 1,444 new files
Database: 3 new tables, 7 new options
New tables
wp_nomore404_caller
wp_nomore404_uri
wp_nomore404_uri_caller
New WordPress options
nomore404_options
nomore404_countURIredirected
nomore404_countCallersBlocked
nomore404_countCallersMarkedMalicious
nomore404_dateCountStarted
nomore404_countURIredirected2Custom
nomore404_countURIblocked

Browser metrics Passed 4 tests

A check of browser resources used by Nomore404 404 Redirection and Firewall
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,114 ▲51815.96 ▲0.3311.10 ▲0.4646.90 ▼7.80
Dashboard /wp-admin3,390 ▲4595.99 ▼0.05145.38 ▼6.38111.57 ▼4.89
Posts /wp-admin/edit.php2,741 ▲22.72 ▲0.0070.34 ▲6.1691.72 ▲2.20
Add New Post /wp-admin/post-new.php1,673 ▼1019.12 ▲0.42358.37 ▼10.65107.05 ▼5.63
Media Library /wp-admin/upload.php1,812 ▲55.02 ▼0.00148.08 ▼11.19119.47 ▲2.52
NoMore404 /wp-admin/options-general.php?page=nomore4041,4052.0961.1873.13

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure failed, leaving 3 tables in the database
    • wp_nomore404_uri_caller
    • wp_nomore404_caller
    • wp_nomore404_uri
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • nomore404_dateCountStarted
    • nomore404_countCallersBlocked
    • nomore404_countURIblocked
    • nomore404_options
    • nomore404_countURIredirected
    • nomore404_countURIredirected2Custom
    • nomore404_countCallersMarkedMalicious

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however 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 items
  • 603× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/nomore404-404-redirection-and-firewall/includes/aws/Aws/ServiceDiscovery/Exception/ServiceDiscoveryException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/nomore404-404-redirection-and-firewall/includes/aws/Aws/AutoScaling/Exception/AutoScalingException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/nomore404-404-redirection-and-firewall/includes/aws/Aws/DataSync/DataSyncClient.php:67
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/nomore404-404-redirection-and-firewall/includes/aws/Aws/Detective/Exception/DetectiveException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/nomore404-404-redirection-and-firewall/includes/aws/Aws/PI/PIClient.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/nomore404-404-redirection-and-firewall/includes/aws/Aws/AlexaForBusiness/Exception/AlexaForBusinessException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Aws\\DynamoDb\\SessionConnectionInterface' not found in wp-content/plugins/nomore404-404-redirection-and-firewall/includes/aws/Aws/DynamoDb/StandardSessionConnection.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/nomore404-404-redirection-and-firewall/includes/aws/Aws/EKS/Exception/EKSException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/nomore404-404-redirection-and-firewall/includes/aws/Aws/signer/Exception/signerException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Promise\\PromisorInterface' not found in wp-content/plugins/nomore404-404-redirection-and-firewall/includes/aws/Aws/S3/ObjectCopier.php:16

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

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
9 plugin tags: block, host, redirection, url, firewall...

nomore404-404-redirection-and-firewall/nomore404.php 69% from 13 tests

Analyzing the main PHP file in "Nomore404 404 Redirection and Firewall" version 2.1
The following require your attention:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nomore404-404-redirection-and-firewall.php" instead of "nomore404.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Description: The description should be shorter than 140 characters (currently 146 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin43,011 lines of code in 1,435 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,4316,93732,81437,690
Markdown42,06205,321

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity5.78
▷ Minimum class complexity1.00
▷ Maximum class complexity125.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces487
Interfaces39
Traits19
Classes722
▷ Abstract classes111.52%
▷ Concrete classes71198.48%
▷ Final classes141.97%
Methods2,398
▷ Static methods36815.35%
▷ Public methods1,67269.72%
▷ Protected methods1375.71%
▷ Private methods58924.56%
Functions448
▷ Named functions10122.54%
▷ Anonymous functions34777.46%
Constants248
▷ Global constants3815.32%
▷ Class constants21084.68%
▷ Public constants210100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
4 PNG files occupy 0.80MB with 0.46MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-722x250.png172.49KB68.39KB▼ 60.35%
assets/icon-128x128.png24.72KB10.97KB▼ 55.61%
assets/banner-1544x500.png547.61KB257.46KB▼ 52.98%
assets/icon-256x256.png79.04KB33.66KB▼ 57.42%