84% gn-publisher

Code Review | GN Publisher: Google News Compatible RSS Feeds

WordPress plugin GN Publisher: Google News Compatible RSS Feeds scored84%from 54 tests.

About plugin

  • Plugin page: gn-publisher
  • Plugin version: 1.5.11.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.4
  • WordPress version: 6.3.1
  • First release: Mar 13, 2020
  • Latest release: Nov 24, 2023
  • Number of updates: 80
  • Update frequency: every 16.9 days
  • Top authors: gnpublisher (60%)christopheran (41.25%)

Code review

54 tests

User reviews

28 reviews

Install metrics

40,000+ active /364,371 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▼0.40ms] Passed 4 tests

This is a short check of server-side resources used by GN Publisher: Google News Compatible RSS Feeds
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1846.27 ▲4.64
Dashboard /wp-admin3.63 ▲0.3347.79 ▼3.01
Posts /wp-admin/edit.php3.68 ▲0.3349.62 ▲5.86
Add New Post /wp-admin/post-new.php6.17 ▲0.2883.07 ▼9.09
Media Library /wp-admin/upload.php3.49 ▲0.2639.68 ▲6.39
GN Publisher /wp-admin/options-general.php?page=gn-publisher-settings3.6137.20

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 33 new files
Database: no new tables, 9 new options
New WordPress options
gnpub_is_default_feed
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
gnpub_include_featured_image
gnpub_last_activation

Browser metrics Passed 4 tests

This is an overview of browser requirements for GN Publisher: Google News Compatible RSS Feeds
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,906 ▲11914.61 ▼0.031.69 ▼0.4041.23 ▼3.52
Dashboard /wp-admin2,289 ▲1095.68 ▲0.0495.94 ▼4.0343.37 ▼0.12
Posts /wp-admin/edit.php2,195 ▲952.04 ▲0.0441.06 ▼5.2135.89 ▲1.60
Add New Post /wp-admin/post-new.php1,617 ▲9123.37 ▲0.11616.03 ▲23.1456.54 ▲3.77
Media Library /wp-admin/upload.php1,489 ▲924.32 ▲0.13102.89 ▲8.0342.99 ▲3.40
GN Publisher /wp-admin/options-general.php?page=gn-publisher-settings1,7162.0544.0947.77

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 10 options
    • gnpub_is_default_feed
    • gnpub_include_featured_image
    • gnpub_last_activation
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • gnpub_last_deactivation
    • widget_recent-comments
    • can_compress_scripts

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)
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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/gn-publisher/templates/deactivate-feedback.php:3

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)
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: google news, google, news, feeds, feed...

gn-publisher/gn-publisher.php Passed 13 tests

"GN Publisher: Google News Compatible RSS Feeds" version 1.5.11.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
78 characters long description:
GN Publisher: The easy way to make Google News Publisher compatible RSS feeds.

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 detected2,851 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP175176491,935
CSS35118577
JavaScript44617339

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity16.00
▷ Minimum class complexity2.00
▷ Maximum class complexity55.00
Average method complexity4.21
▷ Minimum method complexity1.00
▷ Maximum method complexity27.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes110.00%
Methods44
▷ Static methods1022.73%
▷ Public methods4193.18%
▷ Protected methods24.55%
▷ Private methods12.27%
Functions35
▷ Named functions3188.57%
▷ Anonymous functions411.43%
Constants8
▷ Global constants675.00%
▷ Class constants225.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
6 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/google-news.png11.00KB4.62KB▼ 58.00%
assets/images/google.png7.25KB3.34KB▼ 53.95%
assets/images/gn-promo-gift.png19.62KB7.99KB▼ 59.26%
assets/images/support.png4.67KB2.66KB▼ 43.03%
assets/images/logo.png16.22KB6.85KB▼ 57.77%