10% advance-canonical-url

Code Review | Advance Canonical URL

WordPress plugin Advance Canonical URL scored 10% from 54 tests.

About plugin

  • Plugin page: advance-canonical...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-5.7
  • WordPress version: 5.8.1
  • First release: Aug 17, 2017
  • Latest release: Mar 26, 2021
  • Number of updates: 7
  • Update frequency: every 188.2 days
  • Top authors: usmanaliqureshi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

900+ active / 3,814 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
These installer errors require your attention
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/advance-canonical-url/includes/canonical-meta-box.php+21
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼1.85MB] [CPU: ▼215.36ms] Passed 4 tests

This is a short check of server-side resources used by Advance Canonical URL
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /1.78 ▼1.055.00 ▼19.72
Dashboard /wp-admin1.80 ▼1.264.03 ▼34.04
Posts /wp-admin/edit.php1.80 ▼1.313.87 ▼27.95
Add New Post /wp-admin/post-new.php1.80 ▼3.644.47 ▼779.65
Media Library /wp-admin/upload.php1.80 ▼1.204.16 ▼19.78
Advance Canonical Settings /wp-admin/options-general.php?page=advance_canonical_settings1.804.05

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Advance Canonical URL: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,674 ▲7315.84 ▲0.145.77 ▼3.9177.47 ▲0.90
Dashboard /wp-admin2,935 ▲396.11 ▼0.07122.51 ▼11.56173.74 ▼2.42
Posts /wp-admin/edit.php2,745 ▲83.22 ▲0.0067.48 ▲1.90139.98 ▲2.70
Add New Post /wp-admin/post-new.php3,709 ▼2118.83 ▲3.53410.14 ▼35.27159.11 ▼1.54
Media Library /wp-admin/upload.php1,757 ▲55.55 ▲0.04144.58 ▼20.20188.82 ▼0.05
Advance Canonical Settings /wp-admin/options-general.php?page=advance_canonical_settings1,1092.4151.88122.12

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/advance-canonical-url/includes/canonical-meta-box.php+21
    Trying to access array offset on value of type bool

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=advance_canonical_settings
    • > Notice in wp-content/plugins/advance-canonical-url/includes/canonical-meta-box.php+21
    Trying to access array offset on value of type bool

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

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Option for administrators to select canonical method.), #2 (Meta Box option for each post, page and custom post type.)
You can take inspiration from this readme.txt

advance-canonical-url/functions.php 85% from 13 tests

The primary PHP file in "Advance Canonical URL" version 1.0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • 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: It is recommended to name the main PHP file as the plugin slug ("advance-canonical-url.php" instead of "functions.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin358 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP491127303
CSS18355

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity15.50
▷ Minimum class complexity11.00
▷ Maximum class complexity20.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.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
2 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png13.29KB5.95KB▼ 55.26%
screenshot-1.png53.89KB16.41KB▼ 69.55%