10% 404-error-monitor

Code Review | 404 Error Monitor

WordPress plugin 404 Error Monitor scored10%from 54 tests.

About plugin

  • Plugin page: 404-error-monitor
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2.1-4.4.1
  • WordPress version: 6.3.1
  • First release: Sep 16, 2012
  • Latest release: Jan 21, 2016
  • Number of updates: 34
  • Update frequency: every 35.9 days
  • Top authors: Bilbud (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

700+ active /19,761 total downloads

Benchmarks

Plugin footprint 23% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/404-error-monitor/index.php+51
    Methods with the same name as their class will not be constructors in a future version of PHP; errorMonitor has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼63.05ms] Passed 4 tests

An overview of server-side resources used by 404 Error Monitor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.17 ▼1.295.28 ▼42.42
Dashboard /wp-admin2.19 ▼1.155.99 ▼57.87
Posts /wp-admin/edit.php2.19 ▼1.177.43 ▼48.16
Add New Post /wp-admin/post-new.php2.19 ▼3.708.15 ▼103.74
Media Library /wp-admin/upload.php2.19 ▼1.046.87 ▼28.97
404 Error Monitor /wp-admin/admin.php?page=errorMonitor2.197.61
Settings /wp-admin/admin.php?page=errorMonitorSettings2.197.95

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: 1 new table, 12 new options
New tables
wp_errors_404_logs
New WordPress options
theysaidso_admin_options
404-error-monitor-ext_filter
404-error-monitor-clean_after
can_compress_scripts
404-error-monitor-min_hit_count
404-error-monitor-path_filter
widget_recent-comments
404-error-monitor-allow_editors
widget_recent-posts
404-error-monitor-last_clean
...

Browser metrics Passed 4 tests

An overview of browser requirements for 404 Error Monitor
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲7014.72 ▲0.071.59 ▼0.4437.86 ▼13.10
Dashboard /wp-admin2,229 ▲495.65 ▲0.0889.38 ▼2.0238.68 ▼3.13
Posts /wp-admin/edit.php2,131 ▲282.02 ▼0.0140.06 ▼1.5638.53 ▲1.64
Add New Post /wp-admin/post-new.php1,552 ▲2621.11 ▼2.31665.93 ▼21.2546.40 ▼4.84
Media Library /wp-admin/upload.php1,431 ▲314.18 ▲0.03110.24 ▲4.2449.06 ▲0.75
404 Error Monitor /wp-admin/admin.php?page=errorMonitor9182.0229.0431.45
Settings /wp-admin/admin.php?page=errorMonitorSettings9601.8126.6429.44

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/404-error-monitor/index.php+51
    Methods with the same name as their class will not be constructors in a future version of PHP; errorMonitor has a deprecated constructor
  • Zombie tables detected upon uninstall: 1 table
    • wp_errors_404_logs
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=errorMonitorSettings
    • > Deprecated in wp-content/plugins/404-error-monitor/index.php+51
    Methods with the same name as their class will not be constructors in a future version of PHP; errorMonitor has a deprecated constructor

SRP 0% 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
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/404-error-monitor/includes/errorList.php
    • > /wp-content/plugins/404-error-monitor/includes/postbox.php
    • > /wp-content/plugins/404-error-monitor/includes/settings.php
  • 3× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/404-error-monitor/includes/DataTools.php on line 22
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/404-error-monitor/includes/DataTools.php on line 22
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/plugin.php' (include_path='.:/usr/share/php') in wp-content/plugins/404-error-monitor/includes/DataTools.php on line 22

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
The official readme.txt might help

404-error-monitor/index.php 85% from 13 tests

The principal PHP file in "404 Error Monitor" v. 1.1 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("404-error-monitor.php" instead of "index.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 206 characters long)

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
There were no executable files found in this plugin993 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP6138195835
JavaScript11816101
CSS1151657

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.54
Average class complexity40.33
▷ Minimum class complexity28.00
▷ Maximum class complexity56.00
Average method complexity4.28
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods36
▷ Static methods1027.78%
▷ Public methods36100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants583.33%
▷ Class constants116.67%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected