84% colorlib-404-customizer

Code Review | Colorlib 404 Customizer

WordPress plugin Colorlib 404 Customizer scored84%from 54 tests.

About plugin

  • Plugin page: colorlib-404-cust...
  • Plugin version: 1.0.96
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.0
  • WordPress version: 6.3.1
  • First release: Dec 4, 2018
  • Latest release: May 24, 2022
  • Number of updates: 34
  • Update frequency: every 37.5 days
  • Top authors: machothemes (47.06%)giucu91 (29.41%)silkalns (26.47%)raldea89 (5.88%)

Code review

54 tests

User reviews

46 reviews

Install metrics

9,000+ active /182,335 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.19MB] [CPU: ▲3.73ms] Passed 4 tests

Analyzing server-side resources used by Colorlib 404 Customizer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1849.61 ▲7.00
Dashboard /wp-admin3.49 ▲0.1950.06 ▲1.41
Posts /wp-admin/edit.php3.61 ▲0.2553.11 ▲3.31
Add New Post /wp-admin/post-new.php6.08 ▲0.19101.05 ▲9.36
Media Library /wp-admin/upload.php3.42 ▲0.1937.35 ▲3.20

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 92 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
cnfp_settings

Browser metrics Passed 4 tests

Checking browser requirements for Colorlib 404 Customizer
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲9013.38 ▼1.012.11 ▼0.1741.40 ▼5.27
Dashboard /wp-admin2,225 ▲375.85 ▲0.9894.37 ▼20.5740.13 ▼5.79
Posts /wp-admin/edit.php2,105 ▲162.01 ▼0.0239.40 ▲3.6335.97 ▲4.33
Add New Post /wp-admin/post-new.php1,550 ▲1723.07 ▼0.12643.95 ▼38.9449.66 ▼7.29
Media Library /wp-admin/upload.php1,398 ▲74.24 ▲0.0499.20 ▼0.1544.64 ▼3.00

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • cnfp_settings
    • can_compress_scripts
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 22× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-404-customizer/includes/colorlib-template.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-404-customizer/templates/template_09/template_09.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-404-customizer/templates/template_03/template_03.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-404-customizer/templates/template_06/template_06.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-404-customizer/templates/template_07/template_07.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-404-customizer/templates/template_04/template_04.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-404-customizer/templates/template_15/template_15.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-404-customizer/templates/template_14/template_14.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-404-customizer/templates/template_16/template_16.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/colorlib-404-customizer/templates/template_08/template_08.php:1

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% 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
4 plugin tags: 404, 404 page, customize 404 page, 404 page customizer

colorlib-404-customizer/colorlib-404-customizer.php 92% from 13 tests

Analyzing the main PHP file in "Colorlib 404 Customizer" version 1.0.96
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 184 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin7,914 lines of code in 56 files:
LanguageFilesBlank linesComment linesLines of code
CSS23436563,163
SVG1002,671
PHP292691291,793
PO File173100176
JavaScript23510111

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity15.00
Average method complexity1.88
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods24
▷ Static methods14.17%
▷ Public methods2187.50%
▷ Protected methods00.00%
▷ Private methods312.50%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
24 PNG files occupy 3.46MB with 1.55MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
templates/template_08/template_08.png31.81KB14.36KB▼ 54.87%
templates/template_06/template_06.png18.93KB10.36KB▼ 45.31%
templates/template_05/template_05.png22.37KB12.15KB▼ 45.67%
templates/template_13/template_13.png20.56KB12.02KB▼ 41.52%
templates/template_14/template_14.png20.22KB12.96KB▼ 35.92%