10% the-guardian-news-feed

Code Review | The Guardian News Feed

WordPress plugin The Guardian News Feed scored10%from 54 tests.

About plugin

  • Plugin page: the-guardian-news...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.9.1
  • WordPress version: 6.3.1
  • First release: Jul 2, 2010
  • Latest release: Feb 23, 2015
  • Number of updates: 50
  • Update frequency: every 34.3 days
  • Top authors: bluedaniel (46%)openplatform (34%)bruntonspall (24%)

Code review

54 tests

User reviews

5 reviews

Install metrics

60+ active /11,043 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.

Server metrics [RAM: ▼1.71MB] [CPU: ▼56.38ms] Passed 4 tests

An overview of server-side resources used by The Guardian News Feed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.27 ▼1.196.28 ▼38.47
Dashboard /wp-admin2.30 ▼1.017.12 ▼48.56
Posts /wp-admin/edit.php2.30 ▼1.067.29 ▼40.70
Add New Post /wp-admin/post-new.php2.30 ▼3.597.55 ▼97.79
Media Library /wp-admin/upload.php2.30 ▼0.937.60 ▼30.74
Guardian News Feed /wp-admin/options-general.php?page=the-guardian-news-feed/gu-open-platform-settings.php2.306.29
Guardian News Feed /wp-admin/edit.php?page=the-guardian-news-feed/gu-open-platform-article-importer.php2.308.95

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for The Guardian News Feed
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲6214.74 ▲0.152.04 ▼0.1844.93 ▲0.40
Dashboard /wp-admin2,214 ▲265.08 ▼0.82100.24 ▼17.2045.56 ▼1.08
Posts /wp-admin/edit.php2,097 ▲81.97 ▼0.0235.71 ▼2.0734.66 ▼0.33
Add New Post /wp-admin/post-new.php1,539 ▲2023.25 ▲0.47685.45 ▲48.1161.97 ▲9.57
Media Library /wp-admin/upload.php1,396 ▲84.31 ▲0.08101.00 ▼3.5042.30 ▼0.68
Guardian News Feed /wp-admin/options-general.php?page=the-guardian-news-feed/gu-open-platform-settings.php9122.1825.5829.07
Guardian News Feed /wp-admin/edit.php?page=the-guardian-news-feed/gu-open-platform-article-importer.php7932.0226.2629.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?page=the-guardian-news-feed/gu-open-platform-article-importer.php
    • > User deprecated in wp-includes/functions.php+5453
    Function register_sidebar_widget is deprecated since version 2.8.0! Use wp_register_sidebar_widget() instead.
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?page=the-guardian-news-feed/gu-open-platform-article-importer.php
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
    • > GET request to /wp-admin/edit.php?page=the-guardian-news-feed/gu-open-platform-article-importer.php
    • > Notice in wp-content/plugins/the-guardian-news-feed/api/gu-open-platform-api.php+103
    Undefined index: response
    • > GET request to /wp-admin/edit.php?page=the-guardian-news-feed/gu-open-platform-article-importer.php
    • > Notice in wp-content/plugins/the-guardian-news-feed/api/gu-open-platform-api.php+103
    Trying to access array offset on value of type null

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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/the-guardian-news-feed/gu-open-platform-article-importer.php:69
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/the-guardian-news-feed/gu-open-platform-article-importer.php:69

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Donate link: Invalid URI ("")
You can take inspiration from this readme.txt

the-guardian-news-feed/gu-open-platform-settings.php 92% from 13 tests

"The Guardian News Feed" version 1.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("the-guardian-news-feed.php" instead of "gu-open-platform-settings.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
Good job! No executable or dangerous file extensions detected1,303 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP53636581,303

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity35.50
▷ Minimum class complexity1.00
▷ Maximum class complexity127.00
Average method complexity7.00
▷ Minimum method complexity1.00
▷ Maximum method complexity67.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions23
▷ Named functions23100.00%
▷ Anonymous functions00.00%
Constants13
▷ Global constants13100.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
There are no PNG files in this plugin