62% google-news-editors-picks-news-feeds

Code Review | Google News Editors Picks Feed Generator

WordPress plugin Google News Editors Picks Feed Generator scored62%from 54 tests.

About plugin

  • Plugin page: google-news-edito...
  • Plugin version: 2.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-4.7.4
  • WordPress version: 6.3.1
  • First release: Nov 18, 2014
  • Latest release: Jul 31, 2017
  • Number of updates: 35
  • Update frequency: every 28.2 days
  • Top authors: Peoples_Pundit (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /18,605 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼1.10MB] [CPU: ▼43.33ms] Passed 4 tests

Server-side resources used by Google News Editors Picks Feed Generator
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▼0.6315.67 ▼27.32
Dashboard /wp-admin2.88 ▼0.4717.65 ▼45.45
Posts /wp-admin/edit.php2.97 ▼0.3919.68 ▼28.50
Add New Post /wp-admin/post-new.php2.97 ▼2.9221.50 ▼72.06
Media Library /wp-admin/upload.php2.88 ▼0.3620.73 ▼15.11
Add-Ons /wp-admin/admin.php?page=bgnp_addons2.8818.12
Dashboard /wp-admin/admin.php?page=bgnp_dashboard2.8818.32
Settings /wp-admin/admin.php?page=bgnp_options2.8816.97

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Google News Editors Picks Feed Generator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,828 ▲8213.75 ▼0.651.55 ▼0.1341.07 ▲1.04
Dashboard /wp-admin2,237 ▲464.92 ▼0.9698.37 ▼14.5672.72 ▲30.27
Posts /wp-admin/edit.php2,129 ▲402.07 ▲0.0638.02 ▲1.6834.86 ▲2.91
Add New Post /wp-admin/post-new.php6,525 ▲5,01127.88 ▲10.39938.48 ▲258.9544.02 ▼20.78
Media Library /wp-admin/upload.php1,410 ▲254.17 ▼0.0097.39 ▼6.3775.46 ▲29.83
Add-Ons /wp-admin/admin.php?page=bgnp_addons9102.0223.9741.10
Dashboard /wp-admin/admin.php?page=bgnp_dashboard1,1113.0838.6573.91
Settings /wp-admin/admin.php?page=bgnp_options1,4113.1942.0364.01

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/google-news-editors-picks-news-feeds/includes/bgnp-functions.php+93
    Trying to access array offset on value of type bool
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 9 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bgnp_options
    • > Notice in wp-content/plugins/google-news-editors-picks-news-feeds/includes/bgnp-functions.php+101
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=bgnp_options
    • > Notice in wp-content/plugins/google-news-editors-picks-news-feeds/admin/pages/settings_page.php+256
    Undefined variable: bgnp_WMT_path

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 8× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/google-news-editors-picks-news-feeds/bgnp-main.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/google-news-editors-picks-news-feeds/admin/pages/dashboard.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/google-news-editors-picks-news-feeds/includes/bgnp-sec-feed.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/google-news-editors-picks-news-feeds/includes/bgnp-functions.php:105
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/google-news-editors-picks-news-feeds/admin/pages/settings_page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/google-news-editors-picks-news-feeds/includes/bgnp-rss-feed.php:5
    • > PHP Warning
      Use of undefined constant BGNP_URL - assumed 'BGNP_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/google-news-editors-picks-news-feeds/admin/pages/dashboard.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/google-news-editors-picks-news-feeds/admin/pages/add-ons-page.php:9

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following user-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=bgnp_options
    • > Network (severe)
    wp-content/plugins/google-news-editors-picks-news-feeds/css/font-style.css?ver=2.1 - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can look at the official readme.txt

google-news-editors-picks-news-feeds/bgnp-main.php 77% from 13 tests

The primary PHP file in "Google News Editors Picks Feed Generator" version 2.1 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 309 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("google-news-editors-picks-news-feeds.php" instead of "bgnp-main.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin1,931 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP112537081,554
CSS111319281
JavaScript8152396

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity41.00
▷ Minimum class complexity12.00
▷ Maximum class complexity54.00
Average method complexity3.96
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods54
▷ Static methods3259.26%
▷ Public methods5398.15%
▷ Protected methods11.85%
▷ Private methods00.00%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
13 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/bgnp-news-icon_50x50.png6.52KB2.80KB▼ 57.15%
images/bgnp-webmaster-tools_50x50.png6.37KB2.33KB▼ 63.33%
images/you-tube-icon.png2.19KB1.32KB▼ 39.96%
images/bgnp-rss-icon_50x50.png6.98KB2.73KB▼ 60.81%
images/search-icon.png1.97KB0.79KB▼ 60.06%