99% add-wpgraphql-redirection

Code Review | WPGraphQL Redirection Addon

WordPress plugin WPGraphQL Redirection Addon scored 99% from 54 tests.

About plugin

  • Plugin page: add-wpgraphql-red...
  • Plugin version: 0.0.3
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.7
  • WordPress version: 5.9.2
  • First release: Apr 9, 2021
  • Latest release: Apr 20, 2021
  • Number of updates: 4
  • Update frequency: every 2.8 days
  • Top authors: ash_hitch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 721 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Analyzing server-side resources used by WPGraphQL Redirection Addon
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0355.01 ▲4.76
Dashboard /wp-admin3.44 ▲0.0334.21 ▲0.98
Posts /wp-admin/edit.php3.67 ▲0.0337.45 ▲1.62
Add New Post /wp-admin/post-new.php6.90 ▼0.0790.81 ▼1,186.33
Media Library /wp-admin/upload.php3.32 ▲0.0223.61 ▼0.20

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

WPGraphQL Redirection Addon: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,815 ▲6116.06 ▲0.337.32 ▲1.082.68 ▲0.23
Dashboard /wp-admin2,917 ▲566.16 ▼0.05116.03 ▼20.38152.92 ▼9.46
Posts /wp-admin/edit.php2,716 ▲223.23 ▼0.1362.54 ▼2.61144.83 ▼3.21
Add New Post /wp-admin/post-new.php1,702 ▲3418.77 ▼0.13393.43 ▼7.03155.72 ▲1.29
Media Library /wp-admin/upload.php1,720 ▲195.59 ▲0.06145.41 ▼2.61197.72 ▲8.37

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
6 plugin tags: graphql, headless wordpress, decoupled wordpress, redirection, jamstack...

add-wpgraphql-redirection/wp-graphql-redirection.php 77% from 13 tests

The entry point to "WPGraphQL Redirection Addon" version 0.0.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("add-wpgraphql-redirection.php" instead of "wp-graphql-redirection.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin141 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP2241297
Markdown18024
JSON20020

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.11MB with 0.08MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
banner.png116.30KB35.27KB▼ 69.68%