84% tfsp-301-redirects

Code Review | TFSP 301 Redirects

WordPress plugin TFSP 301 Redirects scored 84% from 54 tests.

About plugin

  • Plugin page: tfsp-301-redirects
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.7.3
  • WordPress version: 6.3.1
  • First release: Apr 21, 2017
  • Latest release: Apr 21, 2017
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: totalfloorsanding (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 687 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: ▼4.91ms] Passed 4 tests

Analyzing server-side resources used by TFSP 301 Redirects
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.65 ▼5.35
Dashboard /wp-admin3.31 ▲0.0143.86 ▼3.03
Posts /wp-admin/edit.php3.36 ▲0.0147.49 ▼2.54
Add New Post /wp-admin/post-new.php5.89 ▲0.0190.52 ▼8.70
Media Library /wp-admin/upload.php3.23 ▲0.0034.86 ▲4.14
TFSP 301 Redirects /wp-admin/options-general.php?page=301options3.2042.37

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for TFSP 301 Redirects
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.22 ▼1.171.59 ▼0.3240.33 ▼4.46
Dashboard /wp-admin2,207 ▲195.84 ▼0.06109.20 ▼0.1843.89 ▲0.89
Posts /wp-admin/edit.php2,093 ▲42.01 ▼0.0338.50 ▼2.3735.77 ▼0.80
Add New Post /wp-admin/post-new.php1,524 ▼923.22 ▲0.17597.95 ▼51.8561.67 ▲4.57
Media Library /wp-admin/upload.php1,395 ▲44.21 ▼0.0395.08 ▼1.0541.92 ▼0.90
TFSP 301 Redirects /wp-admin/options-general.php?page=301options9512.0423.8532.87

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however 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
Almost there! Just fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tfsp-301-redirects/tfsp-301-redirects.php:282

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 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
These attributes need your attention:
  • Screenshots: Screenshot #1 (Configuring Permalinks) image not found
Please take inspiration from this readme.txt

tfsp-301-redirects/tfsp-301-redirects.php Passed 13 tests

Analyzing the main PHP file in "TFSP 301 Redirects" version 1.0
109 characters long description:
Make a rundown of URLs that you might want to 301 divert to another page or site. Presently, with a wildcard.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected169 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14181169

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
1 PNG file occupies 0.07MB with 0.05MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png76.67KB21.31KB▼ 72.21%