56% wp-404-page-management

Code Review | WP 404 Page Management

WordPress plugin WP 404 Page Management scored 56% from 54 tests.

About plugin

  • Plugin page: wp-404-page-manag...
  • Plugin version: 0.0.3
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.9
  • WordPress version: 6.3.1
  • First release: Oct 10, 2017
  • Latest release: Dec 5, 2017
  • Number of updates: 10
  • Update frequency: every 5.8 days
  • Top authors: klickonit (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 603 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.94MB] [CPU: ▼33.81ms] Passed 4 tests

Server-side resources used by WP 404 Page Management
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0339.27 ▼4.79
Dashboard /wp-admin3.01 ▼0.3023.20 ▼24.52
Posts /wp-admin/edit.php3.01 ▼0.3525.80 ▼23.21
Add New Post /wp-admin/post-new.php3.01 ▼2.8824.15 ▼74.53
Media Library /wp-admin/upload.php3.01 ▼0.2221.65 ▼12.98
404 Page Management /wp-admin/options-general.php?page=klick_4043.0122.80

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 45 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
klick-404-logging
widget_recent-comments
db_upgraded
klick-404-notice-display-time
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP 404 Page Management
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲15113.59 ▼1.064.69 ▲2.4841.14 ▼8.14
Dashboard /wp-admin2,299 ▲1085.89 ▲1.0098.09 ▼4.7290.60 ▲51.28
Posts /wp-admin/edit.php2,099 ▲102.02 ▼0.0435.07 ▼5.6529.26 ▼5.91
Add New Post /wp-admin/post-new.php1,523 ▼1223.17 ▼0.11636.26 ▼43.4760.72 ▲0.46
Media Library /wp-admin/upload.php1,395 ▲74.31 ▲0.1497.76 ▼6.0340.30 ▼3.32
404 Page Management /wp-admin/options-general.php?page=klick_4041,4801.7228.0928.07

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=klick_404
    • > User notice in wp-includes/functions.php+5905
    Function add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be numeric representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)

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
Almost there! Just fix the following items
  • 15× PHP files perform the task of outputting text when accessed with GET requests (only 10 are shown):
    • > /wp-content/plugins/wp-404-page-management/templates/klick-404-tab-change-log.php
    • > /wp-content/plugins/wp-404-page-management/includes/class-klick-404-abstract-logger.php
    • > /wp-content/plugins/wp-404-page-management/404-page-management.php
    • > /wp-content/plugins/wp-404-page-management/includes/class-klick-404-email-logger.php
    • > /wp-content/plugins/wp-404-page-management/includes/class-klick-404-dashboard.php
    • > /wp-content/plugins/wp-404-page-management/templates/notices-templates/main-dashboard-notices.php
    • > /wp-content/plugins/wp-404-page-management/includes/class-klick-404-abstract-notice.php
    • > /wp-content/plugins/wp-404-page-management/notices/notice-klick-404-no-config.php
    • > /wp-content/plugins/wp-404-page-management/includes/class-klick-404-commands.php
    • > /wp-content/plugins/wp-404-page-management/includes/class-klick-404-options.php
  • 4× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: options in wp-content/plugins/wp-404-page-management/templates/klick-404-tab-information.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/wp-404-page-management/templates/klick-404-tab-our-other-plugins.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function is_configured_url_and_toggle() on null in wp-content/plugins/wp-404-page-management/templates/klick-404-tab-information.php:6
    • > PHP Warning
      Use of undefined constant KLICK_404_PLUGIN_URL - assumed 'KLICK_404_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-404-page-management/templates/klick-404-tab-our-other-plugins.php on line 3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=klick_404
    • > Network (severe)
    wp-content/plugins/wp-404-page-management//images/our-more-plugins/APV.svg - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/options-general.php?page=klick_404
    • > Network (severe)
    wp-content/plugins/wp-404-page-management//images/our-more-plugins/ATS.svg - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
5 plugin tags: page not found, 404, klick, redirect, 301

wp-404-page-management/404-page-management.php 85% from 13 tests

The entry point to "WP 404 Page Management" version 0.0.3 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-404-page-management.php" instead of "404-page-management.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Good job! No executable or dangerous file extensions detected1,714 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
PHP19294479831
SVG11011521
CSS4138214
JavaScript21942101
Markdown127047

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity8.42
▷ Minimum class complexity1.00
▷ Maximum class complexity19.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes216.67%
▷ Concrete classes1083.33%
▷ Final classes00.00%
Methods71
▷ Static methods57.04%
▷ Public methods7098.59%
▷ Protected methods00.00%
▷ Private methods11.41%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.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
6 PNG files occupy 0.14MB with 0.10MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/small_icon.png18.12KB0.45KB▼ 97.52%
images/notices/ual_notice_icon.png20.74KB1.79KB▼ 91.39%
images/notices/ual_notice_icon3.png30.17KB6.04KB▼ 79.98%
images/404-banner.png59.84KB22.05KB▼ 63.15%
images/klick-on-it.png6.51KB4.02KB▼ 38.23%