78% htd-404

Code Review | HTD 404

WordPress plugin HTD 404 scored 78% from 54 tests.

About plugin

  • Plugin page: htd-404
  • Plugin version: 0.1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1
  • WordPress version: 6.3.1
  • First release: May 15, 2014
  • Latest release: Jan 20, 2015
  • Number of updates: 11
  • Update frequency: every 22.7 days
  • Top authors: JoshuaPack (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

90+ active / 3,146 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.23ms] Passed 4 tests

Analyzing server-side resources used by HTD 404
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0242.52 ▼10.28
Dashboard /wp-admin3.33 ▲0.0352.71 ▼0.70
Posts /wp-admin/edit.php3.38 ▲0.0351.93 ▲2.11
Add New Post /wp-admin/post-new.php5.91 ▲0.0390.73 ▼10.98
Media Library /wp-admin/upload.php3.26 ▲0.0339.48 ▲1.05
404 Settings /wp-admin/options-general.php?page=HTD_4043.2032.33

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 31 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for HTD 404
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲1513.56 ▼1.201.78 ▼0.3443.90 ▼1.90
Dashboard /wp-admin2,207 ▼25.86 ▲0.01108.52 ▼2.9442.83 ▼1.20
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0137.24 ▼1.7034.21 ▲1.08
Add New Post /wp-admin/post-new.php1,517 ▼1617.66 ▼5.68673.07 ▼1.6564.66 ▲0.21
Media Library /wp-admin/upload.php1,392 ▲104.23 ▲0.0095.66 ▼17.2541.22 ▼38.46
404 Settings /wp-admin/options-general.php?page=HTD_4048162.0523.5328.88

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=HTD_404
    • > Notice in wp-content/plugins/htd-404/HTD-404.php+59
    Trying to access array offset on value of type bool

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/htd-404/HTD-404.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === htd-404 === )
You can take inspiration from this readme.txt

htd-404/HTD-404.php 92% from 13 tests

Analyzing the main PHP file in "HTD 404" version 0.1.2
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("htd-404.php" instead of "HTD-404.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected514 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
CSS57868346
PHP1151293
HTML10075

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.26
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%
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

All PNG images should be compressed to minimize bandwidth usage for end users
23 PNG files occupy 0.07MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/robotik.png17.06KB6.81KB▼ 60.10%
images/search_button_background_.png0.84KB0.88KB0.00%
themes/green/images/robotik.png11.84KB7.73KB▼ 34.71%
images/search_button_background.png0.85KB0.89KB0.00%
images/message_stick.png0.28KB0.28KB0.00%