83% cc-redirects

Code Review | CC-Redirects

WordPress plugin CC-Redirects scored83%from 54 tests.

About plugin

  • Plugin page: cc-redirects
  • Plugin version: 1.1.1
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.4-6.0.1
  • WordPress version: 6.3.1
  • First release: Mar 29, 2018
  • Latest release: Aug 8, 2022
  • Number of updates: 7
  • Update frequency: every 227.7 days
  • Top authors: ClearcodeHQ (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,056 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.04MB] [CPU: ▼7.29ms] Passed 4 tests

This is a short check of server-side resources used by CC-Redirects
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.41 ▼0.14
Dashboard /wp-admin3.36 ▲0.0150.20 ▼18.44
Posts /wp-admin/edit.php3.47 ▲0.1151.06 ▼0.61
Add New Post /wp-admin/post-new.php5.94 ▲0.0598.84 ▼9.97
Media Library /wp-admin/upload.php3.28 ▲0.0542.21 ▲7.98
Redirects /wp-admin/options-general.php?page=cc-redirects3.3232.87

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 49 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

A check of browser resources used by CC-Redirects
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.48 ▼0.161.71 ▼0.0740.18 ▼1.07
Dashboard /wp-admin2,227 ▲214.84 ▼0.08109.06 ▲1.7543.30 ▼0.09
Posts /wp-admin/edit.php2,116 ▲191.99 ▼0.0339.11 ▲3.4835.76 ▼0.61
Add New Post /wp-admin/post-new.php1,553 ▲2723.47 ▲5.97666.93 ▼2.1358.59 ▼11.81
Media Library /wp-admin/upload.php1,400 ▲34.21 ▼0.01103.87 ▼0.2046.64 ▼1.64
Redirects /wp-admin/options-general.php?page=cc-redirects1,2031.6826.2431.82

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
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/cc-redirects/uninstall.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test


Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (**CC-Redirects Settings** - Visit the 'Settings > Redirects' page, set your preferred redirects and save them.)
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

cc-redirects/plugin.php 92% from 13 tests

"CC-Redirects" version 1.1.1'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: The principal plugin file should be the same as the plugin slug ("cc-redirects.php" instead of "plugin.php")

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
Good job! No executable or dangerous file extensions detected765 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PO File14977129

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity21.50
▷ Minimum class complexity3.00
▷ Maximum class complexity66.00
Average method complexity2.78
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
▷ Abstract classes120.00%
▷ Concrete classes480.00%
▷ Final classes00.00%
▷ Static methods1723.61%
▷ Public methods4765.28%
▷ Protected methods2534.72%
▷ Private methods00.00%
▷ Named functions00.00%
▷ Anonymous functions6100.00%
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 PNG file occupies 0.08MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png81.28KB41.32KB▼ 49.16%