84% remove-canonical-urls-for-facebook

Code Review | Remove Yoast Canonical URL for Social

WordPress plugin Remove Yoast Canonical URL for Social scored84%from 54 tests.

About plugin

  • Plugin page: remove-canonical-...
  • Plugin version: 1.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Sep 5, 2017
  • Latest release: Jan 5, 2023
  • Number of updates: 7
  • Update frequency: every 278.3 days
  • Top authors: anthonyeden (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /1,677 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼7.82ms] Passed 4 tests

An overview of server-side resources used by Remove Yoast Canonical URL for Social
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0145.91 ▲1.83
Dashboard /wp-admin3.31 ▲0.0149.69 ▼6.64
Posts /wp-admin/edit.php3.36 ▲0.0156.53 ▲0.77
Add New Post /wp-admin/post-new.php5.89 ▲0.0191.66 ▼22.43
Media Library /wp-admin/upload.php3.23 ▲0.0136.43 ▼2.96

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Remove Yoast Canonical URL for Social
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.34 ▼0.012.03 ▲0.2941.81 ▼4.38
Dashboard /wp-admin2,198 ▲245.60 ▼0.0292.25 ▼0.8138.41 ▼7.22
Posts /wp-admin/edit.php2,100 ▼02.00 ▲0.0141.42 ▲4.0036.09 ▼1.76
Add New Post /wp-admin/post-new.php1,526 ▼023.57 ▼0.03675.92 ▲47.3757.74 ▲3.62
Media Library /wp-admin/upload.php1,403 ▼04.22 ▼0.03100.65 ▲4.1545.39 ▲1.26

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 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
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/remove-canonical-urls-for-facebook/index.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: yoast, seo, social, facebook, canonical

remove-canonical-urls-for-facebook/index.php 92% from 13 tests

"Remove Yoast Canonical URL for Social" version 1.0.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("remove-canonical-urls-for-facebook.php" instead of "index.php")

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
Good job! No executable or dangerous file extensions detected11 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP151011

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected