84% search-with-google

Code Review | Search with Google

WordPress plugin Search with Google scored 84% from 54 tests.

About plugin

  • Plugin page: search-with-google
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8-6.3
  • WordPress version: 6.3.1
  • First release: Oct 19, 2020
  • Latest release: Aug 23, 2023
  • Number of updates: 4
  • Update frequency: every 260.3 days
  • Top authors: pavanpatil1 (75%)rtcamp (50%)

Code review

54 tests

User reviews

3 reviews

Install metrics

60+ active / 1,602 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

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

A check of server-side resources used by Search with Google
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.15 ▼2.90
Dashboard /wp-admin3.33 ▲0.0345.25 ▼2.16
Posts /wp-admin/edit.php3.44 ▲0.0846.33 ▲0.35
Add New Post /wp-admin/post-new.php5.91 ▲0.0290.66 ▼2.67
Media Library /wp-admin/upload.php3.25 ▲0.0232.41 ▲2.37

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

Search with Google: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.24 ▼1.121.65 ▼0.0639.00 ▼1.98
Dashboard /wp-admin2,206 ▲174.95 ▼0.15108.15 ▲1.6841.42 ▼0.99
Posts /wp-admin/edit.php2,089 ▼02.01 ▲0.0340.18 ▲1.0635.73 ▼0.78
Add New Post /wp-admin/post-new.php1,542 ▲1718.45 ▼4.66594.25 ▼73.3154.54 ▼1.67
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0294.96 ▼0.5639.36 ▼3.31

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • 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 everything seems fine, this is not 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
The following issues need your attention
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Trait 'RT\\Search_With_Google\\Inc\\Traits\\Singleton' not found in wp-content/plugins/search-with-google/inc/classes/class-plugin.php on line 15
    • > PHP Fatal error
      Trait 'RT\\Search_With_Google\\Inc\\Traits\\Singleton' not found in wp-content/plugins/search-with-google/inc/classes/class-search-engine.php on line 17
    • > PHP Fatal error
      Trait 'RT\\Search_With_Google\\Inc\\Traits\\Singleton' not found in wp-content/plugins/search-with-google/inc/classes/class-search.php on line 18
    • > PHP Fatal error
      Trait 'RT\\Search_With_Google\\Inc\\Traits\\Singleton' not found in wp-content/plugins/search-with-google/inc/classes/class-settings.php on line 15

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

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Tags: Too many tags (11 tag instead of maximum 10); only the first 5 tags are used in your directory listing
You can take inspiration from this readme.txt

search-with-google/search-with-google.php Passed 13 tests

The primary PHP file in "Search with Google" version 1.0 is used by WordPress to initiate all plugin functionality
67 characters long description:
Replace WordPress default search with Google Custom Search results.

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
Everything looks great! No dangerous files found in this plugin296 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP7116263296

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity6.60
▷ Minimum class complexity1.00
▷ Maximum class complexity14.00
Average method complexity2.27
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces3
Interfaces0
Traits1
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods1359.09%
▷ Protected methods940.91%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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