74% dmd-infinite-scroll

Code Review | DMD Infinite Scroll

WordPress plugin DMD Infinite Scroll scored74%from 54 tests.

About plugin

  • Plugin page: dmd-infinite-scroll
  • Plugin version: 0.9.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.7.3
  • WordPress version: 6.3.1
  • First release: Jul 4, 2016
  • Latest release: Apr 18, 2017
  • Number of updates: 5
  • Update frequency: every 57.6 days
  • Top authors: deadmustdie (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /5,057 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▼0.88MB] [CPU: ▼39.18ms] Passed 4 tests

A check of server-side resources used by DMD Infinite Scroll
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.10 ▼0.3617.65 ▼21.49
Dashboard /wp-admin3.15 ▼0.2018.87 ▼40.23
Posts /wp-admin/edit.php3.15 ▼0.2118.91 ▼27.29
Add New Post /wp-admin/post-new.php3.15 ▼2.7420.61 ▼67.72
Media Library /wp-admin/upload.php3.15 ▼0.0819.84 ▼14.63

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 21 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by DMD Infinite Scroll
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,072 ▲32613.67 ▼1.098.93 ▲7.2646.35 ▲5.66
Dashboard /wp-admin2,237 ▲524.90 ▲0.04111.22 ▲11.0585.72 ▲39.00
Posts /wp-admin/edit.php2,123 ▲372.05 ▲0.0535.13 ▼1.3731.74 ▲0.12
Add New Post /wp-admin/post-new.php1,697 ▲18322.84 ▲5.11743.83 ▲59.4757.49 ▼0.70
Media Library /wp-admin/upload.php1,419 ▲314.24 ▲0.08103.97 ▼0.3046.20 ▲0.86

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall without warnings or errors
    • > Notice in wp-content/plugins/dmd-infinite-scroll/dmd-infinite-scroll.php+1090
    Undefined index: 0wc_result_count
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% 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 50% 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
Please fix the following
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/dmd-infinite-scroll/includes/settings.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/dmd-infinite-scroll/dmd-infinite-scroll.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: load more buttons, ajax pagination, wordpress infinite scroll, woocommerce infinite scroll, infinite scroll

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

The primary PHP file in "DMD Infinite Scroll" version 0.9.1 is used by WordPress to initiate all plugin functionality
45 characters long description:
Infinite Scroll for WordPress and WooCommerce

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 plugin3,611 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP319101,772
SVG100655
JavaScript401598
CSS5610586

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity66.50
▷ Minimum class complexity33.00
▷ Maximum class complexity100.00
Average method complexity6.70
▷ Minimum method complexity1.00
▷ Maximum method complexity55.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods23
▷ Static methods2191.30%
▷ Public methods23100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
1 PNG file occupies 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
includes/settings_assets/dmdico.png15.41KB0.97KB▼ 93.71%