83% google-trends-shortcode

Code Review | Google Trends Shortcode

WordPress plugin Google Trends Shortcode scored83%from 54 tests.

About plugin

  • Plugin page: google-trends-sho...
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-3.6
  • WordPress version: 6.3.1
  • First release: Jul 3, 2013
  • Latest release: Apr 18, 2017
  • Number of updates: 11
  • Update frequency: every 125.9 days
  • Top authors: boluda (90.91%)unitepress (18.18%)

Code review

54 tests

User reviews

6 reviews

Install metrics

50+ active /3,216 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

An overview of server-side resources used by Google Trends Shortcode
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0137.92 ▲0.74
Dashboard /wp-admin3.31 ▲0.0148.09 ▼1.46
Posts /wp-admin/edit.php3.36 ▲0.0147.33 ▲0.37
Add New Post /wp-admin/post-new.php5.89 ▲0.0186.18 ▼5.18
Media Library /wp-admin/upload.php3.23 ▲0.0037.76 ▲3.40

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Google Trends Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,814 ▲5314.31 ▼0.042.01 ▲0.4140.90 ▲1.78
Dashboard /wp-admin2,195 ▲175.62 ▼0.0988.06 ▼24.3237.93 ▼7.36
Posts /wp-admin/edit.php2,100 ▼31.95 ▼0.0336.96 ▼3.2533.14 ▼4.20
Add New Post /wp-admin/post-new.php1,528 ▼022.97 ▼0.02622.49 ▲14.9377.87 ▲7.69
Media Library /wp-admin/upload.php1,403 ▲34.21 ▲0.02103.07 ▼3.9042.75 ▲1.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
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 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 server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/google-trends-shortcode/google-trends-shortcode.php:48

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === google-trends-shortcode === )
Please take inspiration from this readme.txt

google-trends-shortcode/google-trends-shortcode.php 85% from 13 tests

This is the main PHP file of "Google Trends Shortcode" version 1.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Domain Path: The domain path points to a folder that does not exist ("/lang")

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
There were no executable files found in this plugin19 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP142519

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
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
No PNG files were detected