83% genesis-404-page

Code Review | Genesis 404 Page

WordPress plugin Genesis 404 Page scored83%from 54 tests.

About plugin

  • Plugin page: genesis-404-page
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.2
  • WordPress version: 6.3.1
  • First release: Apr 2, 2012
  • Latest release: May 15, 2023
  • Number of updates: 15
  • Update frequency: every 270.7 days
  • Top authors: billerickson (100%)

Code review

54 tests

User reviews

9 reviews

Install metrics

6,000+ active /47,315 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼5.79ms] Passed 4 tests

Server-side resources used by Genesis 404 Page
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0044.42 ▲5.45
Dashboard /wp-admin3.31 ▲0.0065.19 ▲19.97
Posts /wp-admin/edit.php3.36 ▲0.0050.19 ▼1.36
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.62 ▼28.70
Media Library /wp-admin/upload.php3.23 ▲0.0036.29 ▲1.47

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Genesis 404 Page
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.57 ▼0.981.93 ▲0.2243.17 ▼0.90
Dashboard /wp-admin2,203 ▲155.76 ▼0.16115.12 ▲9.4642.60 ▲3.46
Posts /wp-admin/edit.php2,086 ▼31.99 ▼0.0534.67 ▼4.1431.58 ▼5.58
Add New Post /wp-admin/post-new.php1,542 ▲923.46 ▲0.25687.13 ▼2.9466.33 ▲16.31
Media Library /wp-admin/upload.php1,388 ▲64.23 ▼0.0495.89 ▼2.5440.24 ▼8.36

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Genesis_Admin_Boxes' not found in wp-content/plugins/genesis-404-page/includes/class-be-genesis-404-settings.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
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
These attributes need your attention:
  • Screenshots: Screenshot #1 (Admin screen showing the fields for custom 404 Not Found page title and content.) image missing
The official readme.txt is a good inspiration

genesis-404-page/plugin.php 85% from 13 tests

The principal PHP file in "Genesis 404 Page" v. 1.5.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("genesis-404-page.php" instead of "plugin.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin242 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP373235220
Markdown16022

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.24
Average class complexity11.50
▷ Minimum class complexity2.00
▷ Maximum class complexity21.00
Average method complexity2.05
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods525.00%
▷ Public methods1575.00%
▷ Protected methods210.00%
▷ Private methods315.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png13.83KB9.42KB▼ 31.87%