83% custom-canonical

Code Review | Custom canonical URL for Yoast SEO

WordPress plugin Custom canonical URL for Yoast SEO scored83%from 54 tests.

About plugin

  • Plugin page: custom-canonical
  • Plugin version: 1.01
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: May 31, 2017
  • Latest release: Aug 1, 2023
  • Number of updates: 6
  • Update frequency: every 375.8 days
  • Top authors: ABTOP (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,619 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

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

Server-side resources used by Custom canonical URL for Yoast SEO
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0038.08 ▼2.58
Dashboard /wp-admin3.31 ▲0.0045.55 ▼1.02
Posts /wp-admin/edit.php3.36 ▲0.0051.08 ▲3.13
Add New Post /wp-admin/post-new.php5.89 ▲0.0085.65 ▼5.12
Media Library /wp-admin/upload.php3.23 ▲0.0033.64 ▲2.99

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Custom canonical URL for Yoast SEO
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.21 ▼1.364.57 ▲2.7641.29 ▼4.72
Dashboard /wp-admin2,206 ▲184.83 ▼1.01105.98 ▼8.0637.02 ▼8.22
Posts /wp-admin/edit.php2,089 ▼01.99 ▼0.0240.18 ▲5.2935.70 ▲0.98
Add New Post /wp-admin/post-new.php1,520 ▼1323.30 ▲0.37685.07 ▲38.2456.57 ▲10.64
Media Library /wp-admin/upload.php1,391 ▲64.30 ▲0.0998.01 ▼3.2141.95 ▼1.17

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
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/custom-canonical/custom-canonical.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Contributors: Plugin contributors field is missing
  • Requires at least: Version format is invalid
The official readme.txt is a good inspiration

custom-canonical/custom-canonical.php 92% from 13 tests

The main PHP file in "Custom canonical URL for Yoast SEO" ver. 1.01 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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 plugin69 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1143169

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin