83% nofollow-case-by-case

Code Review | Nofollow Case by Case

WordPress plugin Nofollow Case by Case scored83%from 54 tests.

About plugin

  • Plugin page: nofollow-case-by-...
  • Plugin version: 1.5.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.0-3.8
  • WordPress version: 6.3.1
  • First release: Mar 27, 2007
  • Latest release: Dec 10, 2013
  • Number of updates: 239
  • Update frequency: every 10.3 days
  • Top authors: fob (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

400+ active /37,485 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 successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.67ms] Passed 4 tests

Server-side resources used by Nofollow Case by Case
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0239.02 ▼6.44
Dashboard /wp-admin3.33 ▲0.0249.59 ▼0.85
Posts /wp-admin/edit.php3.38 ▲0.0252.34 ▲0.16
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.73 ▼7.54
Media Library /wp-admin/upload.php3.25 ▲0.0239.17 ▲1.36

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Nofollow Case by Case
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,881 ▲11013.70 ▼0.675.47 ▲3.2741.73 ▼4.93
Dashboard /wp-admin2,209 ▲185.90 ▲0.97108.24 ▲3.7841.74 ▼1.88
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0140.61 ▼1.3435.64 ▼2.25
Add New Post /wp-admin/post-new.php1,533 ▲1923.23 ▲5.74653.91 ▼20.0462.50 ▲13.35
Media Library /wp-admin/upload.php1,391 ▲34.26 ▲0.0099.47 ▼4.3443.94 ▲2.30

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • 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
Even though no errors were found, this is by no means 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 trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_filter() in wp-content/plugins/nofollow-case-by-case/nofollow_case_by_case.php:93

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% 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 to be fixed:
  • Donate link: Invalid URI found ("none")
You can take inspiration from this readme.txt

nofollow-case-by-case/nofollow_case_by_case.php 85% from 13 tests

Analyzing the main PHP file in "Nofollow Case by Case" version 1.5.6
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("nofollow-case-by-case.php" instead of "nofollow_case_by_case.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 141 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin80 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1313769
JavaScript11011

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
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
1 PNG file occupies 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
img/nofollow-case-by-case_explained.png58.29KB20.19KB▼ 65.37%