84% discourage-search-engines-notifier

Code Review | Discourage Search Engines Notifier

WordPress plugin Discourage Search Engines Notifier scored84%from 54 tests.

About plugin

  • Plugin page: discourage-search...
  • Plugin version: 2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Nov 3, 2016
  • Latest release: Apr 4, 2023
  • Number of updates: 27
  • Update frequency: every 86.8 days
  • Top authors: fstab (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

200+ active /3,574 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
This plugin's installer ran successfully

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

A check of server-side resources used by Discourage Search Engines Notifier
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.90 ▲3.82
Dashboard /wp-admin3.31 ▲0.0148.96 ▼4.85
Posts /wp-admin/edit.php3.36 ▲0.0150.90 ▼0.32
Add New Post /wp-admin/post-new.php5.89 ▲0.0187.95 ▼10.04
Media Library /wp-admin/upload.php3.23 ▲0.0134.01 ▲0.08

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Discourage Search Engines Notifier
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲8813.34 ▼0.961.66 ▼0.0837.68 ▼4.01
Dashboard /wp-admin2,216 ▲305.90 ▲1.01113.84 ▼4.2142.30 ▼1.49
Posts /wp-admin/edit.php2,102 ▲102.01 ▼0.0540.45 ▼2.9234.85 ▼2.68
Add New Post /wp-admin/post-new.php1,539 ▲823.35 ▲0.42661.42 ▲31.6256.99 ▲8.84
Media Library /wp-admin/upload.php1,398 ▲74.22 ▼0.0898.36 ▲3.2340.72 ▼2.65

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
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • 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 | 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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix 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_action() in wp-content/plugins/discourage-search-engines-notifier/discourage-search-engines-notifier.php:34

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 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
7 plugin tags: developer, notifier, development, tool, notification...

discourage-search-engines-notifier/discourage-search-engines-notifier.php 92% from 13 tests

The primary PHP file in "Discourage Search Engines Notifier" version 2.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin23 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12923

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.14
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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected