84% tg-404-site-checker

Code Review | 404 Site Checker

WordPress plugin 404 Site Checker scored84%from 54 tests.

About plugin

  • Plugin page: tg-404-site-checker
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 11, 2021
  • Latest release: Jun 29, 2023
  • Number of updates: 18
  • Update frequency: every 38.2 days
  • Top authors: tenseg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /3,249 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by 404 Site Checker
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0338.73 ▼4.21
Dashboard /wp-admin3.34 ▲0.0446.34 ▼0.73
Posts /wp-admin/edit.php3.39 ▲0.0348.19 ▼2.43
Add New Post /wp-admin/post-new.php5.92 ▲0.0396.41 ▲0.53
Media Library /wp-admin/upload.php3.26 ▲0.0332.98 ▼4.54
404 Site Checker /wp-admin/options-general.php?page=tg_404_site_checker3.2330.81

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

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

Browser metrics Passed 4 tests

A check of browser resources used by 404 Site Checker
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.15 ▼1.151.69 ▼0.2343.08 ▼4.78
Dashboard /wp-admin2,213 ▲254.83 ▼0.04107.88 ▼0.8539.23 ▲0.21
Posts /wp-admin/edit.php2,093 ▲72.02 ▲0.0139.27 ▲3.9834.33 ▲2.80
Add New Post /wp-admin/post-new.php1,546 ▲1318.54 ▼4.56608.41 ▼74.0452.38 ▼0.36
Media Library /wp-admin/upload.php1,392 ▲74.17 ▼0.0494.87 ▼10.4141.21 ▼1.57
404 Site Checker /wp-admin/options-general.php?page=tg_404_site_checker8032.0622.9628.78

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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
Good news, no errors were detected

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tg-404-site-checker/tg-404-site-checker.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: 404, redirection, errors

tg-404-site-checker/tg-404-site-checker.php Passed 13 tests

"404 Site Checker" version 1.1.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
71 characters long description:
Check other sites for the requested path and redirect there during 404.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin133 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11974133

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity26.00
▷ Minimum class complexity26.00
▷ Maximum class complexity26.00
Average method complexity5.00
▷ Minimum method complexity2.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods7100.00%
▷ Public methods457.14%
▷ Protected methods00.00%
▷ Private methods342.86%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected