10% wp-rss-by-publishers

Code Review | WP RSS By Publishers

WordPress plugin WP RSS By Publishers scored 10% from 54 tests.

About plugin

  • Plugin page: wp-rss-by-publishers
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.1.1
  • WordPress version: 5.9.2
  • First release: Mar 27, 2015
  • Latest release: Mar 27, 2015
  • Number of updates: 2
  • Update frequency: every 1.5 days
  • Top authors: robert.antofe (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,228 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
You still need to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/wp-rss-by-publishers/classes/feedwordpress/feedfinder.class.php+14
    Methods with the same name as their class will not be constructors in a future version of PHP; FeedFinder has a deprecated constructor

Server metrics [RAM: ▼1.11MB] [CPU: ▼327.50ms] Passed 4 tests

A check of server-side resources used by WP RSS By Publishers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1265.44 ▲15.93
Dashboard /wp-admin3.22 ▼0.1817.08 ▼16.57
Posts /wp-admin/edit.php3.22 ▼0.4218.14 ▼20.15
Add New Post /wp-admin/post-new.php3.22 ▼3.7517.92 ▼1,260.31
Media Library /wp-admin/upload.php3.22 ▼0.0815.88 ▼12.97
Rules /wp-admin/admin.php?page=wsysadmin_rules3.2217.94
Admin /wp-admin/admin.php?page=wsysadmin3.2218.67
Feeds /wp-admin/admin.php?page=wsysadmin_feeds3.2217.49
All publishers /wp-admin/admin.php?page=wsysadmin_publishers3.2217.56
Settings /wp-admin/admin.php?page=wsysadmin_settings3.2216.67
Add publisher /wp-admin/admin.php?page=wsysadmin_add_publisher3.2217.99

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 46 new files
Database: no new tables, 1 new option
New WordPress options
recovery_mode_email_last_sent

Browser metrics Passed 4 tests

A check of browser resources used by WP RSS By Publishers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,807 ▲6315.98 ▲0.285.77 ▼0.372.47 ▲0.30
Dashboard /wp-admin2,931 ▲736.18 ▼0.03125.26 ▼8.86154.42 ▲1.60
Posts /wp-admin/edit.php2,769 ▲753.30 ▲0.0765.01 ▲0.38143.83 ▲0.52
Add New Post /wp-admin/post-new.php1,672 ▲1118.99 ▲3.02410.94 ▼30.45168.89 ▲14.40
Media Library /wp-admin/upload.php1,743 ▲455.68 ▲0.21125.02 ▼15.24192.79 ▼3.22
Rules /wp-admin/admin.php?page=wsysadmin_rules8851.9736.4683.30
Admin /wp-admin/admin.php?page=wsysadmin1,0122.7554.0270.80
Feeds /wp-admin/admin.php?page=wsysadmin_feeds8851.9736.9683.56
All publishers /wp-admin/admin.php?page=wsysadmin_publishers1,4082.7857.35111.49
Settings /wp-admin/admin.php?page=wsysadmin_settings1,0932.7754.96110.47
Add publisher /wp-admin/admin.php?page=wsysadmin_add_publisher1,3252.7853.80139.77

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Uninstall procedure had uncaught errors
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
  • This plugin did not uninstall successfully, leaving 1 option in the database
    • recovery_mode_email_last_sent

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wsysadmin_add_publisher
    • > User notice in wp-includes/functions.php+5768
    add_submenu_page was called incorrectly. The seventh parameter passed to add_submenu_page() should be an integer representing menu position. Please see Debugging in WordPress for more information. (This message was added in version 5.3.0.)
    • > GET request to /wp-admin/admin.php?page=wsysadmin_rules
    • > Error in wp-content/plugins/wp-rss-by-publishers/templates/publishers.php+7
    Uncaught Error: Call to a member function prepare_items() on null in wp-content/plugins/wp-rss-by-publishers/templates/publishers.php:7
    Stack trace:
    #0 wp-content/plugins/wp-rss-by-publishers/wp-rss-by-publisher.php(365): include()
    #1 wp-includes/class-wp-hook.php(307): WP_WsysAdmin->action()
    #2 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(474): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown
    • > GET request to /wp-admin/admin.php?page=wsysadmin_feeds
    • > Error in wp-content/plugins/wp-rss-by-publishers/templates/publishers.php+7
    Uncaught Error: Call to a member function prepare_items() on null in wp-content/plugins/wp-rss-by-publishers/templates/publishers.php:7
    Stack trace:
    #0 wp-content/plugins/wp-rss-by-publishers/wp-rss-by-publisher.php(332): include()
    #1 wp-includes/class-wp-hook.php(307): WP_WsysAdmin->action()
    #2 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()
    #3 wp-includes/plugin.php(474): WP_Hook->do_action()
    #4 wp-admin/admin.php(259): do_action()
    #5 {main}
    thrown

SRP 0% 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
Almost there! Just fix the following items
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/wp-rss-by-publishers/classes/feedwordpress/feedwordpressparsedpostmeta.class.php
  • 48× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-rss-by-publishers/templates/feed-report.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WSYS_DB_Table' not found in wp-content/plugins/wp-rss-by-publishers/classes/wsys-publisher.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-rss-by-publishers/templates/feed-report.php on line 8
    • > PHP Notice
      Undefined variable: results in wp-content/plugins/wp-rss-by-publishers/templates/feed-report.php on line 9
    • > PHP Fatal error
      Uncaught Error: Class 'WSYS_DB_Table' not found in wp-content/plugins/wp-rss-by-publishers/classes/wsys-feed.php:3
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/wp-rss-by-publishers/classes/wsys-feed-table.php on line 3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/wp-rss-by-publishers/templates/feed-report.php on line 6
    • > PHP Notice
      Trying to get property 'data' of non-object in wp-content/plugins/wp-rss-by-publishers/templates/feed-report.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-rss-by-publishers/wsys-redirect-feed-posts.php:28
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-rss-by-publishers/templates/edit-publisher.php:2

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

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Publishers list), #2 (Add Publisher), #3 (Add Feed), #4 (Add Rule), #5 (All posts)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === wp-rss-by-publishers === )
Please take inspiration from this readme.txt

wp-rss-by-publishers/wp-rss-by-publisher.php 85% from 13 tests

The primary PHP file in "WP RSS By Publishers" version 0.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-rss-by-publishers.php" instead of "wp-rss-by-publisher.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 226 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected6,648 lines of code in 39 files:
LanguageFilesBlank linesComment linesLines of code
PHP301,0711,2496,377
CSS1814123
SQL74078
JavaScript171170

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity52.71
▷ Minimum class complexity1.00
▷ Maximum class complexity344.00
Average method complexity4.96
▷ Minimum method complexity1.00
▷ Maximum method complexity48.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes21
▷ Abstract classes00.00%
▷ Concrete classes21100.00%
▷ Final classes00.00%
Methods274
▷ Static methods3713.50%
▷ Public methods27299.27%
▷ Protected methods20.73%
▷ Private methods00.00%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants23
▷ Global constants28.70%
▷ Class constants2191.30%
▷ Public constants21100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
5 PNG files occupy 0.29MB with 0.15MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-3.png81.66KB41.36KB▼ 49.35%
assets/screenshot-5.png83.32KB41.67KB▼ 49.99%
assets/screenshot-1.png33.51KB14.69KB▼ 56.16%
assets/screenshot-4.png38.13KB16.72KB▼ 56.15%
assets/screenshot-2.png61.79KB28.73KB▼ 53.50%