84% include-sitename-in-search-results

Code Review | Include Sitename in Search Results

WordPress plugin Include Sitename in Search Results scored 84% from 54 tests.

About plugin

  • Plugin page: include-sitename-...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Apr 19, 2015
  • Latest release: Sep 23, 2023
  • Number of updates: 30
  • Update frequency: every 102.6 days
  • Top authors: apasionados (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 3,744 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: ▼2.49ms] Passed 4 tests

A check of server-side resources used by Include Sitename in Search Results
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0140.44 ▼2.17
Dashboard /wp-admin3.32 ▲0.0246.30 ▼9.85
Posts /wp-admin/edit.php3.37 ▲0.0149.18 ▲1.38
Add New Post /wp-admin/post-new.php5.90 ▲0.0194.01 ▲0.68
Media Library /wp-admin/upload.php3.24 ▲0.0137.85 ▲4.03
Include Sitename in Search Result /wp-admin/options-general.php?page=ap-issr-setting-admin3.2129.52

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Include Sitename in Search Results: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,807 ▲7213.25 ▼1.291.86 ▲0.0443.49 ▼9.77
Dashboard /wp-admin2,210 ▲195.78 ▲0.9196.09 ▼21.3439.65 ▼8.35
Posts /wp-admin/edit.php2,096 ▲102.05 ▲0.0139.86 ▲2.9936.21 ▲2.67
Add New Post /wp-admin/post-new.php1,545 ▲1218.31 ▼4.88644.62 ▼56.3660.65 ▼3.92
Media Library /wp-admin/upload.php1,395 ▲104.22 ▲0.0293.66 ▼7.9643.13 ▲2.22
Include Sitename in Search Result /wp-admin/options-general.php?page=ap-issr-setting-admin7892.0323.8328.35

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

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)
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 take a closer look at 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 __() in wp-content/plugins/include-sitename-in-search-results/include-sitename-in-search-results.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: site name, search results, google, site name in search results, json-ld...

include-sitename-in-search-results/include-sitename-in-search-results.php 85% from 13 tests

The main PHP script in "Include Sitename in Search Results" version 1.2 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 464 characters long)
  • Text Domain: The text domain follows the same naming rules as the plugin slug: lowercase characters and dashes

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
No dangerous file extensions were detected241 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PO File22860121
PHP11523120

PHP code Passed 2 tests

A short review 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.23
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.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%
Functions2
▷ Named functions2100.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
There are no PNG files in this plugin