84% tipsmoon-infinite-scroll-posts-gallery

Code Review | Tipsmoon Infinite Scroll Posts Gallery

WordPress plugin Tipsmoon Infinite Scroll Posts Gallery scored84%from 54 tests.

About plugin

  • Plugin page: tipsmoon-infinite...
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.8.3
  • WordPress version: 6.3.1
  • First release: Oct 6, 2017
  • Latest release: Nov 6, 2017
  • Number of updates: 26
  • Update frequency: every 1.4 days
  • Top authors: ramzanullah (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /620 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
Install script ran successfully

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

Server-side resources used by Tipsmoon Infinite Scroll Posts Gallery
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0634.68 ▼6.21
Dashboard /wp-admin3.33 ▼0.0146.34 ▼15.71
Posts /wp-admin/edit.php3.38 ▲0.0342.96 ▲0.17
Add New Post /wp-admin/post-new.php6.09 ▲0.2073.81 ▼24.43
Media Library /wp-admin/upload.php3.26 ▲0.0334.43 ▲0.43

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Tipsmoon Infinite Scroll Posts Gallery
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,888 ▲14214.05 ▼0.335.02 ▲3.3040.60 ▼2.82
Dashboard /wp-admin2,206 ▲185.86 ▲0.01100.90 ▼16.2736.43 ▼8.62
Posts /wp-admin/edit.php2,089 ▼02.04 ▲0.0338.46 ▼0.3036.31 ▲4.83
Add New Post /wp-admin/post-new.php1,514 ▼1017.49 ▼5.40674.17 ▲78.9860.43 ▲4.17
Media Library /wp-admin/upload.php1,382 ▼34.20 ▼0.0596.42 ▼8.6742.65 ▼3.56

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% 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 does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/tipsmoon-infinite-scroll-posts-gallery/tipsmoon-infinite-scroll-post-gallery.php:44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Screenshots: Screenshot #1 (Screen shot of related post slider.) image not found
The official readme.txt might help

tipsmoon-infinite-scroll-posts-gallery/tipsmoon-infinite-scroll-post-gallery.php 92% from 13 tests

This is the main PHP file of "Tipsmoon Infinite Scroll Posts Gallery" version 1.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("tipsmoon-infinite-scroll-posts-gallery.php" instead of "tipsmoon-infinite-scroll-post-gallery.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected417 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP113641174
CSS16043124
JavaScript213160119

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.10
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%
Functions6
▷ Named functions6100.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
2 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/back_arrow.png2.73KB2.01KB▼ 26.31%
css/forward_arrow.png2.67KB1.98KB▼ 25.85%