78% randomrss

Code Review | RandomRSS

WordPress plugin RandomRSS scored78%from 54 tests.

About plugin

  • Plugin page: randomrss
  • Plugin version: 1.5.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0.0
  • WordPress version: 6.3.1
  • First release: Jan 22, 2022
  • Latest release: Jun 21, 2022
  • Number of updates: 17
  • Update frequency: every 8.9 days
  • Top authors: paydelete (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /389 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼3.88ms] Passed 4 tests

This is a short check of server-side resources used by RandomRSS
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0542.63 ▲0.10
Dashboard /wp-admin3.35 ▲0.0450.94 ▼1.86
Posts /wp-admin/edit.php3.47 ▲0.1051.35 ▼2.64
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.51 ▼8.17
Media Library /wp-admin/upload.php3.28 ▲0.0436.01 ▼2.83

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 41 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by RandomRSS
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.63 ▲0.071.96 ▲0.2444.76 ▼2.51
Dashboard /wp-admin2,202 ▲225.59 ▼0.0488.05 ▼0.0742.12 ▲1.62
Posts /wp-admin/edit.php2,107 ▲42.02 ▲0.0639.07 ▼2.7337.06 ▼2.80
Add New Post /wp-admin/post-new.php1,532 ▲223.19 ▼0.16626.68 ▼0.2962.23 ▲0.37
Media Library /wp-admin/upload.php1,404 ▲14.18 ▲0.0197.96 ▼9.7045.67 ▲0.20

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/randomrss/public/partials/randomrss-public-display.php
    • > /wp-content/plugins/randomrss/feed.php
    • > /wp-content/plugins/randomrss/admin/partials/randomrss-admin-display.php
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/randomrss/includes/class-randomrss-activator.php on line 2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/randomrss/includes/class-randomrss-activator.php on line 2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/randomrss/includes/class-randomrss-activator.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
3 plugin tags: rss, auto-blogging, syndication

randomrss/randomrss.php 92% from 13 tests

The primary PHP file in "RandomRSS" version 1.5.0 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 224 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin1,076 lines of code in 30 files:
LanguageFilesBlank linesComment linesLines of code
PHP243406951,063
JSON2007
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity8.08
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity2.44
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods60
▷ Static methods1728.33%
▷ Public methods5388.33%
▷ Protected methods00.00%
▷ Private methods711.67%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png20.99KB6.02KB▼ 71.32%
assets/icon-256x256.png38.58KB14.28KB▼ 62.99%