88% 404-page-editor

Code Review | 404 Page Editor

WordPress plugin 404 Page Editor scored 88% from 54 tests.

About plugin

  • Plugin page: 404-page-editor
  • Plugin version: 0.0.03
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.6
  • WordPress version: 5.9.2
  • First release: Nov 11, 2020
  • Latest release: Dec 14, 2020
  • Number of updates: 14
  • Update frequency: every 2.4 days
  • Top authors: wphippos (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 397 total downloads

Benchmarks

Plugin footprint Passed 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.06MB] [CPU: ▼298.91ms] Passed 4 tests

Analyzing server-side resources used by 404 Page Editor
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.0959.12 ▲7.45
Dashboard /wp-admin3.51 ▲0.0940.83 ▲6.58
Posts /wp-admin/edit.php3.74 ▲0.0942.66 ▲6.78
Add New Post /wp-admin/post-new.php6.95 ▼0.0296.74 ▼1,209.41
Media Library /wp-admin/upload.php3.36 ▲0.0724.49 ▲0.42
404 Page Editor /wp-admin/options-general.php?page=w404_config3.3627.75

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 49 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

404 Page Editor: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,123 ▲36918.05 ▲2.2711.82 ▲5.952.15 ▼0.54
Dashboard /wp-admin3,107 ▲2498.00 ▲1.81146.12 ▲9.38162.00 ▲0.93
Posts /wp-admin/edit.php2,955 ▲2675.08 ▲1.8480.85 ▲20.03147.49 ▲9.24
Add New Post /wp-admin/post-new.php1,669 ▲815.94 ▼0.81384.53 ▼55.11162.90 ▲6.04
Media Library /wp-admin/upload.php1,714 ▲165.47 ▼0.03103.93 ▼36.73177.73 ▼5.21
404 Page Editor /wp-admin/options-general.php?page=w404_config1,5214.1969.62163.15

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
Almost there! Just fix the following items
  • 22× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/404-page-editor/modules/tpl/tpl_2020.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/404-page-editor/modules/tpl/tpl_2012.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/404-page-editor/modules/tpl/tpl_2011.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/404-page-editor/modules/tpl/tpl_valentines.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/404-page-editor/modules/hooks.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/404-page-editor/modules/tpl/tpl_2013.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/404-page-editor/modules/tpl/tpl_2021.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/404-page-editor/modules/tpl/tpl_stranded.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/404-page-editor/modules/tpl/tpl_2019.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/404-page-editor/modules/settings.php:3

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=w404_config
    • > Network (severe)
    wp-content/plugins/404-page-editor/modules/inc/assets/css/tw-bs4?ver=5.9.2 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% 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
5 plugin tags: 404, custom 404 pages, seasonal 404 pages, 404 page editor, 404 pages

404-page-editor/404-page-editor.php 92% from 13 tests

Analyzing the main PHP file in "404 Page Editor" version 0.0.03
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 238 characters long)

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
Good job! No executable or dangerous file extensions detected11,301 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
CSS38108,222
SVG13412,522
PHP22211125547
JavaScript26910

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.14
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.05MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/inc/assets/img/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%
modules/inc/assets/img/glyphicons-halflings-white.png8.57KB9.20KB0.00%
modules/inc/assets/css/glyphicons-halflings-white.png8.57KB9.20KB0.00%
modules/inc/assets/img/Get-More.png6.29KB2.40KB▼ 61.76%
modules/inc/assets/css/glyphicons-halflings.png12.50KB10.35KB▼ 17.19%