78% wp-masonry-infinite-scroll

Code Review | WP Masonry & Infinite Scroll

WordPress plugin WP Masonry & Infinite Scroll scored78%from 54 tests.

About plugin

  • Plugin page: wp-masonry-infini...
  • Plugin version: 2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-6.1.1
  • WordPress version: 6.3.1
  • First release: May 8, 2020
  • Latest release: Mar 18, 2023
  • Number of updates: 22
  • Update frequency: every 47.5 days
  • Top authors: kaushik07 (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

100+ active /2,601 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.08MB] [CPU: ▼1.76ms] Passed 4 tests

Analyzing server-side resources used by WP Masonry & Infinite Scroll
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0840.92 ▼1.18
Dashboard /wp-admin3.38 ▲0.0845.89 ▼5.04
Posts /wp-admin/edit.php3.43 ▲0.0847.90 ▼3.25
Add New Post /wp-admin/post-new.php5.96 ▲0.08118.01 ▲25.53
Media Library /wp-admin/upload.php3.31 ▲0.0834.11 ▲2.44

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

WP Masonry & Infinite Scroll: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,925 ▲16813.80 ▼0.469.08 ▲7.0941.12 ▼9.03
Dashboard /wp-admin2,221 ▲336.06 ▲0.25101.13 ▼17.0538.97 ▼6.94
Posts /wp-admin/edit.php2,083 ▼62.07 ▲0.0334.80 ▼1.2835.89 ▲0.39
Add New Post /wp-admin/post-new.php1,552 ▲1818.36 ▼4.75592.85 ▼55.3952.72 ▼1.64
Media Library /wp-admin/upload.php1,397 ▲94.20 ▲0.0498.99 ▲0.8142.25 ▼1.71

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/wp-masonry-infinite-scroll/includes/functions.php
    • > /wp-content/plugins/wp-masonry-infinite-scroll/admin/admin-page.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-masonry-infinite-scroll/wordpress-masonry-infinite-scroll.php:14

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% 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: Screenshot #3 (Boom Magic !) image missing
You can look at the official readme.txt

wp-masonry-infinite-scroll/wordpress-masonry-infinite-scroll.php 85% from 13 tests

Analyzing the main PHP file in "WP Masonry & Infinite Scroll" version 2.0
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 155 characters long)
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-masonry-infinite-scroll.php" instead of "wordpress-masonry-infinite-scroll.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin866 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP316426732
CSS1390129
JavaScript32295

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.34
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%
Constants1
▷ Global constants1100.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
2 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/logo.png12.04KB6.41KB▼ 46.78%
images/wpfavicon.png26.90KB9.17KB▼ 65.90%