83% wp-post-grid-slider-filter-by-xgenious

Code Review | Wp Post Grid / Slider / Filter

WordPress plugin Wp Post Grid / Slider / Filter scored83%from 54 tests.

About plugin

  • Plugin page: wp-post-grid-slid...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-5.2.1
  • WordPress version: 6.3.1
  • First release: May 30, 2019
  • Latest release: May 30, 2019
  • Number of updates: 13
  • Update frequency: every 0.1 days
  • Top authors: xgenious (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,274 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲1.11MB] [CPU: ▼2.62ms] Passed 4 tests

Analyzing server-side resources used by Wp Post Grid / Slider / Filter
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.63 ▲1.1744.48 ▲5.29
Dashboard /wp-admin4.45 ▲1.1051.72 ▼5.09
Posts /wp-admin/edit.php4.50 ▲1.1454.57 ▲10.11
Add New Post /wp-admin/post-new.php6.99 ▲1.1184.31 ▼6.62
Media Library /wp-admin/upload.php4.30 ▲1.0841.11 ▼4.05
All Full Width Grid /wp-admin/edit.php?post_type=xgp-full-width4.4141.73
All Post Filter /wp-admin/edit.php?post_type=xgp-post-filter4.4137.91
All Featured Grid /wp-admin/edit.php?post_type=xgp-featured4.4140.32
All Header Slider /wp-admin/edit.php?post_type=xgp-header4.4141.56
All Post Layouts /wp-admin/edit.php?post_type=xgp-post-layout4.4139.37
All Thumbnail /wp-admin/edit.php?post_type=xgp-thumbnail4.4139.18
Settings /wp-admin/admin.php?page=xg-posts-heper4.2835.82

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 103 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Wp Post Grid / Slider / Filter
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,050 ▲30414.89 ▲0.517.67 ▲5.9538.02 ▼2.29
Dashboard /wp-admin2,313 ▲1275.88 ▲0.97106.11 ▲1.0363.59 ▲21.35
Posts /wp-admin/edit.php2,198 ▲1092.60 ▲0.6045.66 ▲10.5664.60 ▲30.76
Add New Post /wp-admin/post-new.php1,612 ▲9823.81 ▲6.21657.33 ▼9.34119.37 ▲53.19
Media Library /wp-admin/upload.php1,499 ▲1114.99 ▲0.7197.04 ▼6.7468.55 ▲21.41
All Full Width Grid /wp-admin/edit.php?post_type=xgp-full-width1,1722.6037.7257.98
All Post Filter /wp-admin/edit.php?post_type=xgp-post-filter1,1482.5341.3843.30
All Featured Grid /wp-admin/edit.php?post_type=xgp-featured1,1692.6639.1951.77
All Header Slider /wp-admin/edit.php?post_type=xgp-header1,1662.4938.1253.55
All Post Layouts /wp-admin/edit.php?post_type=xgp-post-layout1,1692.4839.4551.53
All Thumbnail /wp-admin/edit.php?post_type=xgp-thumbnail1,1662.4938.0652.20
Settings /wp-admin/admin.php?page=xg-posts-heper9362.2829.7931.42

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/wp-post-grid-slider-filter-by-xgenious/lib/xgm/xg_metabox_framework.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/wp-post-grid-slider-filter-by-xgenious/inc/admin-screens/partials/xg-post-settings.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Tags: You are using too many tags: 15 tag instead of maximum 10
  • Donate link: Invalid url: ""
The official readme.txt might help

wp-post-grid-slider-filter-by-xgenious/xg-posts.php 85% from 13 tests

This is the main PHP file of "Wp Post Grid / Slider / Filter" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 151 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("wp-post-grid-slider-filter-by-xgenious.php" instead of "xg-posts.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected38,124 lines of code in 60 files:
LanguageFilesBlank linesComment linesLines of code
CSS133,65819918,410
JavaScript1098909,995
PHP336518315,390
SVG4034,329

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity15.39
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity3.76
▷ Minimum method complexity1.00
▷ Maximum method complexity98.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods146
▷ Static methods3020.55%
▷ Public methods13391.10%
▷ Protected methods128.22%
▷ Private methods10.68%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants19100.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
10 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
inc/admin-screens/assets/img/icon.png0.54KB0.35KB▼ 34.18%
inc/admin-screens/assets/img/support.png3.99KB2.20KB▼ 44.96%
assets/img/icon/header-slider.png1.31KB1.25KB▼ 4.61%
inc/admin-screens/assets/img/preview.png1.56KB1.49KB▼ 4.45%
assets/img/icon/thumbnail.png1.18KB0.95KB▼ 19.70%