84% discourage-search-engines-by-url

Code Review | Discourage Search Engines by URL

WordPress plugin Discourage Search Engines by URL scored 84% from 54 tests.

About plugin

  • Plugin page: discourage-search...
  • Plugin version: 0.2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-4.7
  • WordPress version: 6.3.1
  • First release: Jan 4, 2017
  • Latest release: Jan 6, 2017
  • Number of updates: 11
  • Update frequency: N/A
  • Top authors: stormrockwell (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,389 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼3.57ms] Passed 4 tests

Server-side resources used by Discourage Search Engines by URL
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.62 ▼2.95
Dashboard /wp-admin3.34 ▲0.0443.45 ▼2.62
Posts /wp-admin/edit.php3.39 ▲0.0347.56 ▲1.37
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.48 ▼10.08
Media Library /wp-admin/upload.php3.26 ▲0.0340.12 ▲6.98

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

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

Browser metrics Passed 4 tests

Discourage Search Engines by URL: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,827 ▲9213.21 ▼1.174.48 ▲2.6940.03 ▼4.19
Dashboard /wp-admin2,221 ▲355.88 ▲0.97114.65 ▲9.9242.80 ▼4.55
Posts /wp-admin/edit.php2,104 ▲122.06 ▲0.0535.77 ▼5.8832.37 ▼3.83
Add New Post /wp-admin/post-new.php1,522 ▼1117.91 ▼5.23681.15 ▲1.5252.48 ▼2.01
Media Library /wp-admin/upload.php1,403 ▲154.24 ▼0.0299.00 ▲1.3142.86 ▼0.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/discourage-search-engines-by-url/discourage-search-engines-by-url.php:35

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 Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: custom, engine, url, visibility, discourage...

discourage-search-engines-by-url/discourage-search-engines-by-url.php Passed 13 tests

"Discourage Search Engines by URL" version 0.2.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
138 characters long description:
Allows you to discourage search engines by url to prevent you from forgetting to turn it off going between development and live instances.

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
Good job! No executable or dangerous file extensions detected105 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP24353105

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods8
▷ Static methods00.00%
▷ Public methods8100.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
PNG images were not found in this plugin