83% gn-keyword-news

Code Review | Google News Keyword Meta Tag

WordPress plugin Google News Keyword Meta Tag scored83%from 54 tests.

About plugin

  • Plugin page: gn-keyword-news
  • Plugin version: 0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Sep 28, 2012
  • Latest release: Nov 17, 2014
  • Number of updates: 19
  • Update frequency: every 41.1 days
  • Top authors: fotoblog (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active /7,446 total downloads

Benchmarks

Plugin footprint 83% from 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.00MB] [CPU: ▼3.29ms] Passed 4 tests

This is a short check of server-side resources used by Google News Keyword Meta Tag
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.85 ▼7.26
Dashboard /wp-admin3.31 ▲0.0146.90 ▼0.71
Posts /wp-admin/edit.php3.36 ▲0.0043.07 ▼5.12
Add New Post /wp-admin/post-new.php5.89 ▲0.0097.01 ▼0.05
Media Library /wp-admin/upload.php3.23 ▲0.0033.80 ▲1.85

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Google News Keyword Meta Tag
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲7914.48 ▼0.111.93 ▼0.0641.46 ▼3.87
Dashboard /wp-admin2,206 ▲155.90 ▲1.02101.61 ▼2.3540.92 ▲2.06
Posts /wp-admin/edit.php2,089 ▼02.03 ▲0.0133.65 ▼3.0633.68 ▼2.63
Add New Post /wp-admin/post-new.php1,532 ▲1823.06 ▲5.50640.94 ▲40.1852.94 ▲5.01
Media Library /wp-admin/upload.php1,391 ▼04.14 ▼0.1398.78 ▲0.0141.64 ▲0.31

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 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 50% 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 items
  • 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/gn-keyword-news/gn-news-keyword.php:22

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 86% from 29 tests

readme.txt 81% from 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
Attributes that require attention:
  • Screenshots: Please add an image for screenshot #1 (How to setup it the first time on your blog)
  • Donate link: Invalid URI found ("")
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === gn-keyword-news === )
The official readme.txt might help

gn-keyword-news/gn-news-keyword.php 92% from 13 tests

The main PHP file in "Google News Keyword Meta Tag" ver. 0.5 adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("gn-keyword-news.php" instead of "gn-news-keyword.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected12 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP12912

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.20
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.04MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png37.04KB30.63KB▼ 17.32%