84% rapid-canonical-urls

Code Review | Rapid Canonical URLs

WordPress plugin Rapid Canonical URLs scored84%from 54 tests.

About plugin

  • Plugin page: rapid-canonical-urls
  • Plugin version: 1.0
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-5.4
  • WordPress version: 6.3.1
  • First release: Jul 13, 2014
  • Latest release: Feb 17, 2020
  • Number of updates: 11
  • Update frequency: every 186.0 days
  • Top authors: peterwilsoncc (63.64%)peterwilsoncc-syncbot (45.45%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /5,038 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Rapid Canonical URLs
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.11 ▼4.03
Dashboard /wp-admin3.32 ▲0.0156.22 ▼0.47
Posts /wp-admin/edit.php3.37 ▲0.0153.46 ▲5.46
Add New Post /wp-admin/post-new.php5.90 ▲0.0187.08 ▼15.64
Media Library /wp-admin/upload.php3.24 ▲0.0139.21 ▲4.29

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: 4 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Rapid Canonical URLs
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.61 ▼1.061.58 ▼0.9043.38 ▼8.60
Dashboard /wp-admin2,206 ▲185.88 ▲0.80103.99 ▼1.4738.97 ▼8.04
Posts /wp-admin/edit.php2,089 ▼31.98 ▼0.0240.97 ▼3.4337.60 ▼3.41
Add New Post /wp-admin/post-new.php1,533 ▼923.46 ▲5.16657.76 ▲40.0255.58 ▲8.53
Media Library /wp-admin/upload.php1,388 ▼34.17 ▼0.0396.95 ▼1.0744.28 ▲0.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rapid-canonical-urls/rapid-canonical-urls.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
3 plugin tags: history api, canonical urls, html5

rapid-canonical-urls/rapid-canonical-urls.php Passed 13 tests

The primary PHP file in "Rapid Canonical URLs" version 1.0 is used by WordPress to initiate all plugin functionality
114 characters long description:
Reduce 301 redirects and HTTP requests by using HTML5’s history API to show visitors the correct, canonical URL.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
There were no executable files found in this plugin49 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3114149

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.47
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
Namespaces1
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin