10% google-search-cse

Code Review | WordPress Google Search

WordPress plugin WordPress Google Search scored10%from 54 tests.

About plugin

  • Plugin page: google-search-cse
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Nov 13, 2012
  • Latest release: Jan 16, 2013
  • Number of updates: 11
  • Update frequency: every 6.4 days
  • Top authors: johnnytee (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /9,917 total downloads

Benchmarks

Plugin footprint 40% 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
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/google-search-cse/wordpress-glcse.php+140
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼51.70ms] Passed 4 tests

Server-side resources used by WordPress Google Search
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.87 ▼39.36
Dashboard /wp-admin2.05 ▼1.266.17 ▼43.85
Posts /wp-admin/edit.php2.05 ▼1.314.88 ▼39.61
Add New Post /wp-admin/post-new.php2.05 ▼3.845.24 ▼83.96
Media Library /wp-admin/upload.php2.05 ▼1.185.89 ▼24.01

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_seed_glcse_widget
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for WordPress Google Search
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.68 ▼0.671.77 ▼0.7044.41 ▲0.76
Dashboard /wp-admin2,209 ▲245.90 ▲0.07103.27 ▲2.6838.20 ▼5.58
Posts /wp-admin/edit.php2,089 ▼32.01 ▼0.0133.51 ▼4.1634.65 ▼9.00
Add New Post /wp-admin/post-new.php1,543 ▲918.45 ▼4.83634.67 ▲21.5048.46 ▼0.57
Media Library /wp-admin/upload.php1,391 ▼04.18 ▲0.0297.30 ▼8.6244.60 ▲1.14

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Deprecated in wp-content/plugins/google-search-cse/wordpress-glcse.php+140
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts
    • widget_seed_glcse_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
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/google-search-cse/wordpress-glcse.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === google-search-cse === )
  • Requires at least: Version format is invalid
The official readme.txt might help

google-search-cse/wordpress-glcse.php 92% from 13 tests

"WordPress Google Search" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("google-search-cse.php" instead of "wordpress-glcse.php")

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

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin