10% wp-google-search

Code Review | WP Google Search

WordPress plugin WP Google Search scored10%from 54 tests.

About plugin

  • Plugin page: wp-google-search
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-6.0.1
  • WordPress version: 6.3.1
  • First release: Jan 15, 2014
  • Latest release: Aug 3, 2022
  • Number of updates: 39
  • Update frequency: every 80.1 days
  • Top authors: WebshopLogic (100%)

Code review

54 tests

User reviews

30 reviews

Install metrics

10,000+ active /169,225 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
You still need to fix the following installer errors
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/wp-google-search/wp-google-search.php+116
    Trying to access array offset on value of type bool

Server metrics [RAM: ▲0.09MB] [CPU: ▼7.11ms] Passed 4 tests

Server-side resources used by WP Google Search
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1041.78 ▼1.13
Dashboard /wp-admin3.41 ▲0.0754.76 ▼10.19
Posts /wp-admin/edit.php3.52 ▲0.1750.61 ▼1.47
Add New Post /wp-admin/post-new.php5.99 ▲0.1188.87 ▼15.65
Media Library /wp-admin/upload.php3.33 ▲0.1138.25 ▲3.65
WP Google Search /wp-admin/options-general.php?page=wp-google-search3.3035.70

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 23 new files
Database: no new tables, 8 new options
New WordPress options
wgs_general_settings
widget_wgs_widget
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for WP Google Search
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲12213.54 ▼0.862.35 ▲0.6941.91 ▲0.40
Dashboard /wp-admin2,233 ▲304.86 ▼0.06110.85 ▲2.6243.16 ▲5.49
Posts /wp-admin/edit.php2,115 ▲152.02 ▼0.0334.68 ▼2.0933.09 ▼0.45
Add New Post /wp-admin/post-new.php1,537 ▲617.70 ▼5.55695.29 ▲38.3648.26 ▼12.88
Media Library /wp-admin/upload.php1,415 ▲154.26 ▲0.01115.37 ▲7.3245.99 ▲2.10
WP Google Search /wp-admin/options-general.php?page=wp-google-search9962.0325.5732.78

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • widget_wgs_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • wgs_general_settings
    • widget_recent-posts

Smoke tests 50% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/wp-google-search/wgs-widget.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-google-search/wp-google-search.php:48

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/options-general.php?page=wp-google-search
    • > Network (severe)
    https://cse.google.com/cse/cse.js?cx= - Failed to load resource: the server responded with a status of 400 ()
    • > GET request to /wp-admin/options-general.php?page=wp-google-search
    • > Network (severe)
    http://emberpalanta.hu/wp-content/plugins/wp-related-items/images/WLI_product_box_PRO_upgrade_right_v1_2e_235x235.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
7 plugin tags: wordpress google search, google custom search, sce, google search, wp google search...

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

The main file in "WP Google Search" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
80 characters long description:
This plugin gives a very simple way to add Google Search to your WordPress site.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,144 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PO File7147182626
PHP319067410
CSS4251998
JavaScript10110

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity8.00
▷ Minimum class complexity3.00
▷ Maximum class complexity15.00
Average method complexity2.24
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.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