78% google-cse

Code Review | Google CSE

WordPress plugin Google CSE scored78%from 54 tests.

About plugin

  • Plugin page: google-cse
  • Plugin version: 1.0.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5
  • WordPress version: 6.3.1
  • First release: Aug 19, 2012
  • Latest release: Jan 4, 2015
  • Number of updates: 16
  • Update frequency: every 54.3 days
  • Top authors: ptz0n (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

200+ active /52,894 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.44ms] Passed 4 tests

An overview of server-side resources used by Google CSE
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0136.09 ▼1.49
Dashboard /wp-admin3.31 ▲0.0141.66 ▼14.04
Posts /wp-admin/edit.php3.36 ▲0.0141.46 ▼1.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0196.64 ▼9.13
Media Library /wp-admin/upload.php3.24 ▲0.0133.92 ▼0.96
Google CSE /wp-admin/options-general.php?page=google-cse-options3.2029.66

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Google CSE: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲9413.34 ▼1.034.56 ▲2.7145.05 ▲2.94
Dashboard /wp-admin2,210 ▲224.87 ▼0.00100.77 ▼15.6936.17 ▼12.01
Posts /wp-admin/edit.php2,093 ▲12.00 ▼0.0241.92 ▲5.4136.57 ▲4.94
Add New Post /wp-admin/post-new.php1,526 ▲1223.36 ▲5.91681.22 ▼78.4073.83 ▲8.57
Media Library /wp-admin/upload.php1,392 ▲44.20 ▲0.01138.27 ▼32.9679.47 ▲18.05
Google CSE /wp-admin/options-general.php?page=google-cse-options8372.0627.7730.68

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
Please fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/google-cse/google-cse.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/google-cse/admin.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function status_header() in wp-content/plugins/google-cse/uninstall.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (Search Results), #2 (Settings)
Please take inspiration from this readme.txt

google-cse/google-cse.php Passed 13 tests

This is the main PHP file of "Google CSE" version 1.0.7, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
54 characters long description:
Google powered search for your WordPress site or blog.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin247 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP333117247

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.79
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.25MB with 0.15MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png124.54KB52.99KB▼ 57.46%
screenshot-2.png136.24KB57.60KB▼ 57.72%