10% random-excerpts-fader

Code Review | Random Excerpts Fader

WordPress plugin Random Excerpts Fader scored10%from 54 tests.

About plugin

  • Plugin page: random-excerpts-f...
  • Plugin version: 2.4.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.7.2
  • WordPress version: 6.3.1
  • First release: Sep 4, 2010
  • Latest release: Feb 4, 2017
  • Number of updates: 32
  • Update frequency: every 73.3 days
  • Top authors: jackreichert (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

90+ active /6,003 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/random-excerpts-fader/RandomExcerptsFader.php+262
    Function create_function() is deprecated

Server metrics [RAM: ▼1.85MB] [CPU: ▼58.53ms] Passed 4 tests

Analyzing server-side resources used by Random Excerpts Fader
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.14 ▼1.325.10 ▼32.57
Dashboard /wp-admin2.16 ▼1.146.58 ▼46.50
Posts /wp-admin/edit.php2.16 ▼1.207.00 ▼48.79
Add New Post /wp-admin/post-new.php2.16 ▼3.736.89 ▼106.25
Media Library /wp-admin/upload.php2.16 ▼1.075.49 ▼29.24

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 7 new options
New WordPress options
widget_refader_widget
widget_recent-posts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Random Excerpts Fader
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,908 ▲16213.62 ▼1.046.93 ▲5.2843.53 ▲3.99
Dashboard /wp-admin2,209 ▲185.88 ▼0.02105.18 ▲4.6342.77 ▼1.07
Posts /wp-admin/edit.php2,089 ▼32.03 ▼0.0136.20 ▼4.5532.55 ▼0.57
Add New Post /wp-admin/post-new.php1,533 ▼023.26 ▲0.23672.25 ▼23.4459.45 ▲12.01
Media Library /wp-admin/upload.php1,382 ▼64.28 ▲0.0197.09 ▼14.4739.34 ▼9.31

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
You still need to fix the following
  • The plugin did not uninstall gracefully
    • > Deprecated in wp-content/plugins/random-excerpts-fader/RandomExcerptsFader.php+262
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_refader_widget
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/random-excerpts-fader/RandomExcerptsFader.php:13

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === random-excerpts-fader === )
You can take inspiration from this readme.txt

random-excerpts-fader/RandomExcerptsFader.php 85% from 13 tests

The main PHP script in "Random Excerpts Fader" version 2.4.1 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("random-excerpts-fader.php" instead of "RandomExcerptsFader.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 152 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 plugin243 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP12646191
JavaScript114749
CSS1003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity13.50
▷ Minimum class complexity12.00
▷ Maximum class complexity15.00
Average method complexity4.57
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
PNG images were not found in this plugin