10% awesome-random-post

Code Review | Awesome Random Post

WordPress plugin Awesome Random Post scored10%from 54 tests.

About plugin

  • Plugin page: awesome-random-post
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Oct 28, 2018
  • Latest release: Jun 16, 2019
  • Number of updates: 7
  • Update frequency: every 33.0 days
  • Top authors: raihancse (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /608 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
It is recommended to fix the following installer errors
  • This plugin did not install gracefully
    • > Deprecated in wp-content/plugins/awesome-random-post/Awesome_Random_Post.php+22
    Methods with the same name as their class will not be constructors in a future version of PHP; awesome_random_article has a deprecated constructor

Server metrics [RAM: ▼1.87MB] [CPU: ▼51.41ms] Passed 4 tests

A check of server-side resources used by Awesome Random Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.12 ▼1.355.05 ▼31.93
Dashboard /wp-admin2.14 ▼1.176.34 ▼43.81
Posts /wp-admin/edit.php2.14 ▼1.226.50 ▼39.82
Add New Post /wp-admin/post-new.php2.14 ▼3.757.53 ▼90.08
Media Library /wp-admin/upload.php2.14 ▼1.106.34 ▼29.07

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_awesome_random_article
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

Awesome Random Post: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,879 ▲13313.64 ▼1.044.92 ▲3.0539.91 ▼2.96
Dashboard /wp-admin2,206 ▲185.85 ▼0.07101.11 ▼2.4839.22 ▼3.83
Posts /wp-admin/edit.php2,089 ▼02.02 ▼0.0333.69 ▼3.4434.75 ▲3.11
Add New Post /wp-admin/post-new.php1,544 ▲3018.36 ▲0.75622.96 ▼64.7769.33 ▲17.54
Media Library /wp-admin/upload.php1,388 ▼34.20 ▲0.0294.05 ▼13.9741.82 ▼11.88

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/awesome-random-post/Awesome_Random_Post.php+22
    Methods with the same name as their class will not be constructors in a future version of PHP; awesome_random_article has a deprecated constructor
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-posts
    • widget_awesome_random_article
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/awesome-random-post/awesome_rand_front_end.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Donate link: Invalid URI ("raihanislamcse.me")
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === awesome-random-post === )
Please take inspiration from this readme.txt

awesome-random-post/Awesome_Random_Post.php 92% from 13 tests

"Awesome Random Post" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("awesome-random-post.php" instead of "Awesome_Random_Post.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
There were no executable files found in this plugin379 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP29120379

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity14.00
▷ Minimum class complexity14.00
▷ Maximum class complexity14.00
Average method complexity4.25
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected