84% infinite-scroll-random-post

Code Review | Infinite Scroll Random Post

WordPress plugin Infinite Scroll Random Post scored 84% from 54 tests.

About plugin

  • Plugin page: infinite-scroll-r...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.4.1
  • WordPress version: 5.8.1
  • First release: Jun 1, 2020
  • Latest release: Jun 1, 2020
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: GeroNikolov (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active / 530 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼146.61ms] Passed 4 tests

A check of server-side resources used by Infinite Scroll Random Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.86 ▲0.1447.30 ▲22.86
Dashboard /wp-admin3.09 ▲0.0350.55 ▼3.86
Posts /wp-admin/edit.php3.14 ▲0.0351.07 ▼1.53
Add New Post /wp-admin/post-new.php5.44 ▲0.01106.59 ▼583.19
Media Library /wp-admin/upload.php3.03 ▲0.0337.32 ▲2.14

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 6 new files
Database: 1 new table, no new options
New tables
wp_isrp_tracker_unique

Browser metrics Passed 4 tests

A check of browser resources used by Infinite Scroll Random Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.35 ▲0.4413.08 ▼4.9954.90 ▼0.27
Dashboard /wp-admin2,973 ▲425.86 ▼0.06143.49 ▼22.13118.69 ▲1.26
Posts /wp-admin/edit.php2,739 ▼02.71 ▼0.0170.96 ▲0.3495.36 ▲2.31
Add New Post /wp-admin/post-new.php1,683 ▼018.60 ▲0.23416.90 ▲15.14115.04 ▲7.20
Media Library /wp-admin/upload.php1,807 ▼04.99 ▼0.04161.05 ▼9.77126.48 ▼1.62

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_isrp_tracker_unique

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/infinite-scroll-random-post/isrp.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
6 plugin tags: listing, lazy loading, open source, random post, lazy load...

infinite-scroll-random-post/isrp.php 92% from 13 tests

Analyzing the main PHP file in "Infinite Scroll Random Post" version 1.0
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("infinite-scroll-random-post.php" instead of "isrp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected255 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP12621128
JavaScript12428118
Sass1005
CSS1114

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity2.43
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin