10% infinite-scroll-generatepress

Code Review | Infinite Scroll for GeneratePress

WordPress plugin Infinite Scroll for GeneratePress scored 10% from 54 tests.

About plugin

  • Plugin page: infinite-scroll-g...
  • Plugin version: 1.0.4
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8.1
  • WordPress version: 5.9.2
  • First release: Oct 25, 2017
  • Latest release: Oct 16, 2021
  • Number of updates: 12
  • Update frequency: every 121.0 days
  • Top authors: mathewemoore (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,321 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Notice in wp-content/plugins/infinite-scroll-generatepress/gp_infinite_scroll.php+42
    Trying to access array offset on value of type bool

Server metrics [RAM: ▼2.48MB] [CPU: ▼344.97ms] Passed 4 tests

This is a short check of server-side resources used by Infinite Scroll for GeneratePress
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.88 ▼1.635.65 ▼49.35
Dashboard /wp-admin1.90 ▼1.504.79 ▼34.08
Posts /wp-admin/edit.php1.90 ▼1.744.67 ▼36.31
Add New Post /wp-admin/post-new.php1.90 ▼5.064.64 ▼1,255.46
Media Library /wp-admin/upload.php1.90 ▼1.393.97 ▼38.75

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by Infinite Scroll for GeneratePress
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,957 ▲20316.37 ▲0.6310.57 ▲4.422.91 ▲0.07
Dashboard /wp-admin2,895 ▲376.10 ▼0.19137.90 ▼1.43161.91 ▼37.08
Posts /wp-admin/edit.php2,711 ▲263.24 ▲0.0166.58 ▲0.68135.68 ▼6.63
Add New Post /wp-admin/post-new.php1,674 ▼3716.38 ▼4.46406.27 ▼49.98155.56 ▼2.42
Media Library /wp-admin/upload.php1,718 ▲205.55 ▲0.01139.13 ▲0.13217.19 ▲33.59

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The plugin did not uninstall gracefully
    • > Notice in wp-content/plugins/infinite-scroll-generatepress/gp_infinite_scroll.php+42
    Trying to access array offset on value of type bool

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Infinite_Scroll_GeneratePress' not found in wp-content/plugins/infinite-scroll-generatepress/admin/settings.php:6

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, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
2 plugin tags: generatepress, infinite scroll

infinite-scroll-generatepress/gp_infinite_scroll.php 85% from 13 tests

"Infinite Scroll for GeneratePress" version 1.0.4's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("infinite-scroll-generatepress.php" instead of "gp_infinite_scroll.php")
  • Description: The description should be shorter than 140 characters (currently 181 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
No dangerous file extensions were detected318 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP25854237
JavaScript17674
CSS1007

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity14.00
▷ Minimum class complexity8.00
▷ Maximum class complexity20.00
Average method complexity2.62
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods16100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin