77% posts-grid

Code Review | The Best Post Grid Plugin to Display Posts in Grid, Slider, Popup, Masonry Layout, and more

WordPress plugin The Best Post Grid Plugin to Display Posts in Grid, Slider, Popup, Masonry Layout, and more scored77%from 54 tests.

About plugin

  • Plugin page: posts-grid
  • Plugin version: 1.2.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-6.3
  • WordPress version: 6.3.1
  • First release: Mar 1, 2018
  • Latest release: Aug 30, 2023
  • Number of updates: 46
  • Update frequency: every 43.7 days
  • Top authors: samdani (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

100+ active /9,219 total downloads

Benchmarks

Plugin footprint 82% 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.10MB] [CPU: ▼5.08ms] 75% from 4 tests

This is a short check of server-side resources used by The Best Post Grid Plugin to Display Posts in Grid, Slider, Popup, Masonry Layout, and more
It is recommended to improve the following
  • CPU: The total CPU usage must kept under 500.00ms (currently 638.21ms on /wp-admin/admin.php?page=gs-grid-plugins-lite)
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0433.57 ▼6.95
Dashboard /wp-admin3.49 ▲0.1550.17 ▼8.44
Posts /wp-admin/edit.php3.54 ▲0.1953.91 ▲8.17
Add New Post /wp-admin/post-new.php6.01 ▲0.1291.44 ▼7.77
Media Library /wp-admin/upload.php3.33 ▲0.1038.44 ▲2.84
GS Plugins Pro /wp-admin/admin.php?page=gs-grid-plugins-premium3.42630.20
Help & Usage /wp-admin/admin.php?page=gs-grid-plugins-help3.3236.99
Posts Grid /wp-admin/admin.php?page=gs-posts-grid-settings3.3235.40
GS Plugins Lite /wp-admin/admin.php?page=gs-grid-plugins-lite3.53638.21

Server storage [IO: ▲0.68MB] [DB: ▲0.04MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 27 new files
Database: no new tables, 9 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts
gs_wpposts_style_settings
gs_wpposts_option_01_settings
widget_recent-comments
widget_theysaidso_widget
gs_wpposts_option_02_settings

Browser metrics Passed 4 tests

A check of browser resources used by The Best Post Grid Plugin to Display Posts in Grid, Slider, Popup, Masonry Layout, and more
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,021 ▲27515.04 ▲0.881.60 ▼0.2441.53 ▼2.30
Dashboard /wp-admin2,423 ▲2356.75 ▲0.86138.33 ▲19.9843.50 ▼0.06
Posts /wp-admin/edit.php2,329 ▲2373.71 ▲1.6056.99 ▲20.4036.22 ▲3.72
Add New Post /wp-admin/post-new.php1,741 ▲20822.77 ▼0.48685.04 ▲47.0038.21 ▼10.13
Media Library /wp-admin/upload.php1,468 ▲834.51 ▲0.30103.67 ▲1.6344.63 ▲0.67
GS Plugins Pro /wp-admin/admin.php?page=gs-grid-plugins-premium2,4013.4643.1693.93
Help & Usage /wp-admin/admin.php?page=gs-grid-plugins-help1,1403.3246.6439.44
Posts Grid /wp-admin/admin.php?page=gs-posts-grid-settings1,8836.14111.1151.36
GS Plugins Lite /wp-admin/admin.php?page=gs-grid-plugins-lite2,7423.4751.1894.26

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 9 options
    • db_upgraded
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • gs_wpposts_option_01_settings
    • widget_theysaidso_widget
    • gs_wpposts_option_02_settings
    • gs_wpposts_style_settings

Smoke tests 50% 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
Please fix the following
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Notice
      Undefined index: gs_wpposts_loop in wp-content/plugins/posts-grid/gs-wpposts-files/includes/templates/gs_wpposts_structure_grid_2_square_halfoverlay.php on line 11
    • > PHP Notice
      Undefined variable: output in wp-content/plugins/posts-grid/gs-wpposts-files/includes/templates/gs_wpposts_structure_grid_1_square_overlay.php on line 7
    • > PHP Warning
      require_once(GSWPPOSTS_FILES_DIR/includes/gs_wpposts_shortcode.php): failed to open stream: No such file or directory in wp-content/plugins/posts-grid/gs-wpposts-files/includes/gs-post-grid-root.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/posts-grid/gs-wpposts-files/includes/gs_wpposts_shortcode.php:15
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/posts-grid/gs-wpposts-files/includes/templates/gs_wpposts_structure_grid_1_square_overlay.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/posts-grid/gs_wpposts.php:23
    • > PHP Notice
      Undefined variable: output in wp-content/plugins/posts-grid/gs-wpposts-files/includes/templates/gs_wpposts_structure_grid_2_square_halfoverlay.php on line 8
    • > PHP Fatal error
      require_once(): Failed opening required 'GSWPPOSTS_FILES_DIR/includes/gs_wpposts_shortcode.php' (include_path='.:/usr/share/php') in wp-content/plugins/posts-grid/gs-wpposts-files/includes/gs-post-grid-root.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/posts-grid/gs-wpposts-files/includes/templates/gs_wpposts_structure_grid_2_square_halfoverlay.php:11
    • > PHP Notice
      Undefined index: gs_wpposts_loop in wp-content/plugins/posts-grid/gs-wpposts-files/includes/templates/gs_wpposts_structure_grid_1_square_overlay.php on line 10

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=gs-posts-grid-settings
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'ambient-light-sensor'.
    • > GET request to /wp-admin/admin.php?page=gs-posts-grid-settings
    • > Security (warning) in unknown
    security - Error with Permissions-Policy header: Unrecognized feature: 'bluetooth'.

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: best free post grid plugin wordpress, best post grid plugin, wordpress post grid plugin, post grid plugin, post grid

posts-grid/gs_wpposts.php 77% from 13 tests

The entry point to "The Best Post Grid Plugin to Display Posts in Grid, Slider, Popup, Masonry Layout, and more" version 1.2.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 639 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("posts-grid.php" instead of "gs_wpposts.php")
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
Good job! No executable or dangerous file extensions detected6,241 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP147188822,886
CSS6177342,618
Sass11016521
JavaScript15065194
JSON10021
SVG1001

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity37.57
▷ Minimum class complexity3.00
▷ Maximum class complexity70.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods140
▷ Static methods10.71%
▷ Public methods10675.71%
▷ Protected methods64.29%
▷ Private methods2820.00%
Functions17
▷ Named functions1588.24%
▷ Anonymous functions211.76%
Constants7
▷ Global constants7100.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
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
gs-wpposts-files/assets/img/no_img.png8.45KB3.71KB▼ 56.07%
gs-wpposts-files/assets/img/icon-128x128.png7.40KB3.71KB▼ 49.84%