90% google-404

Code Review | 404 Widget for Google

WordPress plugin 404 Widget for Google scored90%from 54 tests.

About plugin

  • Plugin page: google-404
  • Plugin version: 2.1
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.3
  • WordPress version: 6.3.1
  • First release: Nov 1, 2008
  • Latest release: Nov 28, 2019
  • Number of updates: 30
  • Update frequency: every 134.8 days
  • Top authors: husobj (80%)dmchale (23.33%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /12,226 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.55ms] Passed 4 tests

Analyzing server-side resources used by 404 Widget for Google
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.35 ▼2.84
Dashboard /wp-admin3.34 ▼0.0143.80 ▼11.54
Posts /wp-admin/edit.php3.45 ▲0.0946.52 ▲4.67
Add New Post /wp-admin/post-new.php5.92 ▲0.0385.13 ▼3.36
Media Library /wp-admin/upload.php3.26 ▲0.0334.81 ▼0.46

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for 404 Widget for Google
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4314.17 ▼0.282.22 ▲0.5544.49 ▲2.77
Dashboard /wp-admin2,195 ▲145.49 ▼0.2995.20 ▼6.4339.95 ▼0.65
Posts /wp-admin/edit.php2,097 ▼31.98 ▼0.0337.29 ▲1.2435.69 ▲2.07
Add New Post /wp-admin/post-new.php1,531 ▲521.04 ▼2.20673.43 ▼1.7744.31 ▼12.30
Media Library /wp-admin/upload.php1,400 ▼04.23 ▲0.0596.51 ▲1.2342.59 ▼1.04

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Congratulations! This plugin passed the SRP test

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 Passed 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
3 plugin tags: error, 404, google

google-404/google-404.php Passed 13 tests

The main PHP script in "404 Widget for Google" version 2.1 is automatically included on every request by WordPress
83 characters long description:
Adds a Google 404 widget to your 'page not found' template which you can customize.

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
Everything looks great! No dangerous files found in this plugin155 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP52572155

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity5.00
▷ Minimum class complexity2.00
▷ Maximum class complexity8.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods750.00%
▷ Public methods1071.43%
▷ Protected methods00.00%
▷ Private methods428.57%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
PNG images were not found in this plugin