89% canonical-link

Code Review | Canonical Link

WordPress plugin Canonical Link scored89%from 54 tests.

About plugin

  • Plugin page: canonical-link
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: May 16, 2010
  • Latest release: Aug 19, 2023
  • Number of updates: 30
  • Update frequency: every 161.4 days
  • Top authors: bhadaway (100%)

Code review

54 tests

User reviews

1 review

Install metrics

1,000+ active /11,394 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.01MB] [CPU: ▼8.52ms] Passed 4 tests

Analyzing server-side resources used by Canonical Link
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.20 ▼5.64
Dashboard /wp-admin3.32 ▲0.0144.41 ▼8.43
Posts /wp-admin/edit.php3.37 ▲0.0148.95 ▲2.67
Add New Post /wp-admin/post-new.php5.90 ▲0.0284.36 ▼19.03
Media Library /wp-admin/upload.php3.24 ▲0.0135.62 ▼0.99

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Canonical Link
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,801 ▲5513.23 ▼1.061.74 ▼0.1745.01 ▲0.78
Dashboard /wp-admin2,206 ▲185.84 ▲0.96106.17 ▼9.9941.48 ▼3.02
Posts /wp-admin/edit.php2,089 ▼02.00 ▲0.0138.75 ▲3.6334.79 ▼1.17
Add New Post /wp-admin/post-new.php6,231 ▲4,68926.00 ▲7.75913.90 ▲288.4273.78 ▲22.97
Media Library /wp-admin/upload.php1,391 ▲34.19 ▼0.0299.39 ▲3.8744.50 ▲1.61

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Congratulations! This plugin passed the SRP test

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 93% 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
8 plugin tags: canonicalization, google, seo, user-friendly, seo-friendly...

canonical-link/canonical-link.php 85% from 13 tests

The main file in "Canonical Link" v. 1.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 292 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin46 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP131246

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.64
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%
Functions4
▷ Named functions4100.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
No PNG files were detected