94% wp-google-suggest

Code Review | WP Google Suggest

WordPress plugin WP Google Suggest scored 94% from 54 tests.

About plugin

  • Plugin page: wp-google-suggest
  • Plugin version: 2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.6
  • WordPress version: 5.8.1
  • First release: May 10, 2011
  • Latest release: Nov 24, 2020
  • Number of updates: 21
  • Update frequency: every 166.0 days
  • Top authors: kobenland (61.9%)obenland (42.86%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active / 3,954 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼138.96ms] Passed 4 tests

This is a short check of server-side resources used by WP Google Suggest
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.88 ▲0.1742.35 ▲19.62
Dashboard /wp-admin3.10 ▲0.0444.06 ▲5.47
Posts /wp-admin/edit.php3.15 ▲0.0443.83 ▼0.66
Add New Post /wp-admin/post-new.php5.45 ▲0.0288.71 ▼562.56
Media Library /wp-admin/upload.php3.04 ▲0.0431.80 ▲1.91

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

This is an overview of browser requirements for WP Google Suggest
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,864 ▲26816.97 ▲1.3820.72 ▲10.6752.05 ▼2.99
Dashboard /wp-admin2,970 ▲395.95 ▼0.01151.84 ▲12.09107.36 ▼2.68
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0065.31 ▲3.8988.13 ▼1.25
Add New Post /wp-admin/post-new.php1,672 ▼1118.88 ▲0.14367.29 ▲0.03106.25 ▼2.76
Media Library /wp-admin/upload.php1,807 ▼05.04 ▲0.02151.00 ▼3.83115.79 ▼6.16

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

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

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-google-suggest/obenland-wp-plugins.php:97

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
5 plugin tags: google suggest, google, jquery, search, ajax

wp-google-suggest/wp-google-suggest.php 92% from 13 tests

The entry point to "WP Google Suggest" version 2 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Version: Use only periods and digits for the version number (ex. "1.0.3" instead of "2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected320 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP251219168
PO File2154074
JavaScript23439
CSS20025
XML14314

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity6.50
▷ Minimum class complexity4.00
▷ Maximum class complexity9.00
Average method complexity1.92
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods975.00%
▷ Protected methods216.67%
▷ Private methods18.33%
Functions0
▷ Named functions00.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
No PNG images were found in this plugin