89% advance-canonical-url

Code Review | Advance Canonical URL

WordPress plugin Advance Canonical URL scored89%from 54 tests.

About plugin

  • Plugin page: advance-canonical...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Aug 17, 2017
  • Latest release: Jan 21, 2023
  • Number of updates: 8
  • Update frequency: every 247.9 days
  • Top authors: usmanaliqureshi (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /9,557 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.06MB] [CPU: ▼5.18ms] Passed 4 tests

Analyzing server-side resources used by Advance Canonical URL
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.21 ▲3.83
Dashboard /wp-admin3.37 ▲0.0644.10 ▼3.85
Posts /wp-admin/edit.php3.48 ▲0.1247.17 ▲1.68
Add New Post /wp-admin/post-new.php5.95 ▲0.0678.57 ▼20.64
Media Library /wp-admin/upload.php3.29 ▲0.0635.62 ▲2.09
Advance Canonical Settings /wp-admin/options-general.php?page=advance_canonical_settings3.2531.79

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Advance Canonical URL
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲6113.19 ▼1.241.71 ▼0.0545.34 ▲2.27
Dashboard /wp-admin2,210 ▲225.03 ▲0.1899.14 ▼13.8340.43 ▼6.19
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0740.26 ▼1.1935.62 ▼1.07
Add New Post /wp-admin/post-new.php1,539 ▲2218.70 ▲0.97631.87 ▲9.5563.26 ▲13.25
Media Library /wp-admin/upload.php1,392 ▲14.16 ▼0.0995.28 ▼6.0541.81 ▼5.19
Advance Canonical Settings /wp-admin/options-general.php?page=advance_canonical_settings8292.0330.2627.11

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

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

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side


Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • 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 look at the official readme.txt

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

The main PHP script in "Advance Canonical URL" version 1.0.2 is automatically included on every request by WordPress
You should first fix the following items:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • 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 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin361 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity16.50
▷ Minimum class complexity12.00
▷ Maximum class complexity21.00
Average method complexity2.63
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions00.00%
▷ 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-1.png53.89KB16.41KB▼ 69.55%
screenshot-2.png13.29KB5.95KB▼ 55.26%