84% infinite-scroll-p2

Code Review | Infinite Scroll for P2

WordPress plugin Infinite Scroll for P2 scored84%from 54 tests.

About plugin

  • Plugin page: infinite-scroll-p2
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.3-4.7
  • WordPress version: 6.3.1
  • First release: Jul 1, 2016
  • Latest release: Jul 1, 2016
  • Number of updates: 7
  • Update frequency: every 23.3 days
  • Top authors: kylesureline (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,083 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.00MB] [CPU: ▼2.54ms] Passed 4 tests

A check of server-side resources used by Infinite Scroll for P2
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0037.50 ▼6.02
Dashboard /wp-admin3.31 ▲0.0045.97 ▼3.28
Posts /wp-admin/edit.php3.36 ▲0.0049.34 ▼1.21
Add New Post /wp-admin/post-new.php5.89 ▲0.0094.79 ▲1.65
Media Library /wp-admin/upload.php3.23 ▲0.0035.57 ▲0.36

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Infinite Scroll for P2
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.24 ▼1.061.78 ▼0.1042.39 ▼1.30
Dashboard /wp-admin2,209 ▲214.83 ▼0.08109.78 ▲6.4741.90 ▼3.29
Posts /wp-admin/edit.php2,092 ▲32.04 ▲0.0238.43 ▲0.9836.37 ▲2.66
Add New Post /wp-admin/post-new.php1,533 ▲1323.00 ▼0.15619.95 ▼73.0248.85 ▼10.20
Media Library /wp-admin/upload.php1,388 ▼04.23 ▼0.0893.34 ▼6.2540.47 ▼2.28

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The following issues need your attention
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/infinite-scroll-p2/infinite-scroll-p2.php on line 12
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/infinite-scroll-p2/infinite-scroll-p2.php on line 12
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/infinite-scroll-p2/infinite-scroll-p2.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/infinite-scroll-p2/infinite-scroll-p2.php:29

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 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
4 plugin tags: p2, infinite, scroll, jetpack

infinite-scroll-p2/infinite-scroll-p2.php Passed 13 tests

The main PHP script in "Infinite Scroll for P2" version 1.0 is automatically included on every request by WordPress
56 characters long description:
Adds support to the P2 theme for Jetpack Infinite Scroll

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
Success! There were no dangerous files found in this plugin40 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1102039
JavaScript1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png49.13KB13.58KB▼ 72.36%