10% custom-404-error-page-unlimited-designs-colors-and-fonts

Code Review | Custom 404 Error Page: Unilimited designs and colors

WordPress plugin Custom 404 Error Page: Unilimited designs and colors scored 10% from 54 tests.

About plugin

  • Plugin page: custom-404-error-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.4
  • WordPress version: 5.9.2
  • First release: Jun 26, 2012
  • Latest release: Mar 11, 2013
  • Number of updates: 15
  • Update frequency: every 17.3 days
  • Top authors: WpThemeShock (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active / 16,696 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Please fix the following installer errors
  • Install procedure had errors
    • > Warning in wp-content/plugins/custom-404-error-page-unlimited-designs-colors-and-fonts/custom404.php+20
    Use of undefined constant CUSTOM_404_PLUGIN_ROOT - assumed 'CUSTOM_404_PLUGIN_ROOT' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼2.17MB] [CPU: ▼354.62ms] Passed 4 tests

This is a short check of server-side resources used by Custom 404 Error Page: Unilimited designs and colors
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.325.06 ▼72.27
Dashboard /wp-admin2.21 ▼1.194.37 ▼32.78
Posts /wp-admin/edit.php2.21 ▼1.425.52 ▼31.38
Add New Post /wp-admin/post-new.php2.21 ▼4.755.23 ▼1,282.06
Media Library /wp-admin/upload.php2.21 ▼1.085.57 ▼19.76

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 169 new files
Database: no new tables, 22 new options
New WordPress options
custom404_content_title
custom404_link_href_4
custom404_title_font_size
custom404_link_text_2
custom404_title_font
custom404_link_href_3
custom404_link_href_5
custom404_link_text_3
custom404_link_text_4
custom404_text_font_size
...

Browser metrics Passed 4 tests

Custom 404 Error Page: Unilimited designs and colors: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,800 ▲4615.57 ▲0.337.07 ▲1.102.85 ▲0.30
Dashboard /wp-admin2,897 ▲406.06 ▼0.06119.00 ▼10.99214.48 ▲47.12
Posts /wp-admin/edit.php2,705 ▲113.12 ▼0.1264.84 ▼3.52141.22 ▼12.82
Add New Post /wp-admin/post-new.php1,771 ▲6021.46 ▼0.08474.07 ▲16.12224.21 ▲46.31
Media Library /wp-admin/upload.php1,716 ▲215.53 ▼0.02142.27 ▲0.38225.69 ▲3.31

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall gracefully
    • > Warning in wp-content/plugins/custom-404-error-page-unlimited-designs-colors-and-fonts/custom404.php+20
    Use of undefined constant CUSTOM_404_PLUGIN_ROOT - assumed 'CUSTOM_404_PLUGIN_ROOT' (this will throw an Error in a future version of PHP)

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
Almost there! Just fix the following items
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/custom-404-error-page-unlimited-designs-colors-and-fonts/custom404.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/custom-404-error-page-unlimited-designs-colors-and-fonts/custom404page.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that need to be fixed:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The 404 fits just right on you layout, so that users still feels at home.), #2 (Customizable 404 message.), #3 (You can change the background color, the pattern that it'll have and also an image that is placed at the right bottom of the page.)
  • Donate link: Please fix this invalid url: ""
The official readme.txt is a good inspiration

custom-404-error-page-unlimited-designs-colors-and-fonts/custom404.php 92% from 13 tests

The primary PHP file in "Custom 404 Error Page: Unilimited designs and colors" version 1.2 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("custom-404-error-page-unlimited-designs-colors-and-fonts.php" instead of "custom404.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin3,142 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript657741,203
PHP34238938
CSS310553
PO File4196192448

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
133 PNG files occupy 1.18MB with 0.55MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
patterns_thumb/pattern_025.png0.76KB0.66KB▼ 13.18%
patterns/pattern_014.png0.18KB0.10KB▼ 42.22%
custom_img/14.png27.66KB8.92KB▼ 67.75%
custom_img/08.png51.23KB15.70KB▼ 69.36%
patterns/pattern_007.png0.19KB0.11KB▼ 39.47%