89% add-wpgraphql-redirection

Code Review | WPGraphQL Redirection Addon

WordPress plugin WPGraphQL Redirection Addon scored89%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: 6.3.1
  • 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

200+ active /2,824 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by WPGraphQL Redirection Addon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0232.74 ▼8.39
Dashboard /wp-admin3.33 ▲0.0349.32 ▼6.88
Posts /wp-admin/edit.php3.38 ▲0.0256.38 ▲9.05
Add New Post /wp-admin/post-new.php5.91 ▲0.0286.85 ▼11.92
Media Library /wp-admin/upload.php3.25 ▲0.0234.56 ▼0.21

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WPGraphQL Redirection Addon
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲4313.31 ▼1.304.48 ▲2.4142.50 ▼5.13
Dashboard /wp-admin2,220 ▲354.85 ▼1.05109.07 ▼8.5239.85 ▼3.31
Posts /wp-admin/edit.php2,103 ▲142.16 ▲0.1136.64 ▼2.7633.37 ▼1.98
Add New Post /wp-admin/post-new.php1,545 ▲2623.03 ▼0.06674.28 ▼26.4151.23 ▼8.42
Media Library /wp-admin/upload.php1,402 ▲204.26 ▲0.0399.15 ▼9.1745.91 ▲1.53

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 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
6 plugin tags: graphql, headless wordpress, redirection, wpgraphql, jamstack...

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

The main file in "WPGraphQL Redirection Addon" v. 0.0.3 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("add-wpgraphql-redirection.php" instead of "wp-graphql-redirection.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path folder does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous 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 overview of cyclomatic complexity and code structure
All good! No complexity issues found
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%