83% infinite-scroll-in-media-library

Code Review | Infinite Scroll for Media Library

WordPress plugin Infinite Scroll for Media Libraryscored83%from 54 tests.

About plugin

  • Plugin page: infinite-scroll-i...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.1-6.1
  • WordPress version: 6.3.1
  • First release: Sep 13, 2021
  • Latest release: Apr 3, 2023
  • Number of updates: 4
  • Update frequency: every 142.5 days
  • Top authors: optimtechstudio (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /616 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼5.91ms] Passed 4 tests

Analyzing server-side resources used by Infinite Scroll for Media Library
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0231.89 ▼7.09
Dashboard /wp-admin3.34 ▲0.0343.03 ▼2.28
Posts /wp-admin/edit.php3.39 ▲0.0344.75 ▼4.57
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.87 ▼9.69
Media Library /wp-admin/upload.php3.26 ▲0.0330.75 ▼0.11
Media Infinite Scroll /wp-admin/options-general.php?page=optim-infinite-scroll3.2331.11

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 6 new files
Database: no new tables, 7 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
optim_is_choice
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Infinite Scroll for Media Library
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.30 ▼0.891.52 ▼0.3638.49 ▼4.44
Dashboard /wp-admin2,210 ▲195.86 ▲0.99105.30 ▼12.6142.27 ▼1.03
Posts /wp-admin/edit.php2,093 ▲41.98 ▼0.1538.92 ▲1.1134.49 ▼0.50
Add New Post /wp-admin/post-new.php1,549 ▲3518.39 ▲0.73610.77 ▼76.9768.45 ▲22.96
Media Library /wp-admin/upload.php1,375 ▼134.09 ▼0.1793.18 ▼2.9343.33 ▼1.63
Media Infinite Scroll /wp-admin/options-general.php?page=optim-infinite-scroll8372.0625.7628.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • optim_is_choice
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

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
Good news, no errors were detected

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 errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/infinite-scroll-in-media-library/infinite-scrolling-media-library.php:46

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 79% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Screenshots: A description for screenshot #4 is missing in infinite-scroll-in-media-library/assets to your readme.txt
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === Infinite Scroll for Media Library=== )
You can look at the official readme.txt

infinite-scroll-in-media-library/infinite-scrolling-media-library.php 69% from 13 tests

Analyzing the main PHP file in "Infinite Scroll for Media Library" version 1.0.0
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("infinite-scroll-in-media-library.php" instead of "infinite-scrolling-media-library.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Requires PHP: The required version number did not match the one declared in readme.txt ("7.0" instead of "7.2")

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
There were no executable files found in this plugin178 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP234155176
Markdown1002

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity3.50
▷ Minimum class complexity3.00
▷ Maximum class complexity4.00
Average method complexity1.56
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.01MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
images/optim-logo.png6.53KB6.68KB0.00%