90% google-trends-widget

Code Review | Google Trends Widget

WordPress plugin Google Trends Widget scored90%from 54 tests.

About plugin

  • Plugin page: google-trends-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4
  • WordPress version: 6.3.1
  • First release: Feb 7, 2015
  • Latest release: Mar 7, 2020
  • Number of updates: 7
  • Update frequency: every 265.0 days
  • Top authors: ithoib (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /4,181 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by Google Trends Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0435.69 ▼3.04
Dashboard /wp-admin3.35 ▲0.0444.03 ▼5.31
Posts /wp-admin/edit.php3.40 ▲0.0445.02 ▼2.62
Add New Post /wp-admin/post-new.php5.93 ▲0.0488.64 ▼5.52
Media Library /wp-admin/upload.php3.27 ▲0.0435.76 ▲3.09

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_igtrends2

Browser metrics Passed 4 tests

A check of browser resources used by Google Trends Widget
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7913.16 ▼1.221.84 ▲0.1440.21 ▼1.46
Dashboard /wp-admin2,209 ▲215.88 ▲0.9896.14 ▼3.1540.08 ▼3.72
Posts /wp-admin/edit.php2,089 ▼02.12 ▲0.0836.36 ▼4.9631.99 ▼4.03
Add New Post /wp-admin/post-new.php1,533 ▲1423.38 ▲0.13613.74 ▲9.0850.95 ▼3.06
Media Library /wp-admin/upload.php1,388 ▼34.24 ▲0.0096.49 ▼1.1243.69 ▲0.14

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_theysaidso_widget
    • widget_igtrends2
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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 SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
3 plugin tags: widget, trends, google

google-trends-widget/igtrends2.php 92% from 13 tests

Analyzing the main PHP file in "Google Trends Widget" version 1.0
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("google-trends-widget.php" instead of "igtrends2.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin155 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1320155

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.60
Average class complexity64.00
▷ Minimum class complexity64.00
▷ Maximum class complexity64.00
Average method complexity13.60
▷ Minimum method complexity1.00
▷ Maximum method complexity51.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.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

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin