83% content-views-query-and-display-post-page

Code Review | Content Views - Post Grid Gutenberg Blocks and Shortcode

WordPress plugin Content Views - Post Grid Gutenberg Blocks and Shortcode scored83%from 54 tests.

About plugin

  • Plugin page: content-views-que...
  • Plugin version: 3.6.1.1
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-6.4
  • WordPress version: 6.3.1
  • First release: May 28, 2014
  • Latest release: Nov 18, 2023
  • Number of updates: 303
  • Update frequency: every 11.5 days
  • Top authors: PT Guy (100%)

Code review

54 tests

User reviews

326 reviews

Install metrics

100,000+ active /3,885,568 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲5.36MB] [CPU: ▲3.53ms] 75% from 4 tests

A check of server-side resources used by Content Views - Post Grid Gutenberg Blocks and Shortcode
The following require your attention
  • Extra RAM: The extra memory usage should kept under 5MB (currently 5.36MB on /wp-admin/admin.php?page=content-views-setting)
PageMemory (MB)CPU Time (ms)
Home /8.85 ▲5.3942.01 ▲1.04
Dashboard /wp-admin8.68 ▲5.3750.31 ▼0.94
Posts /wp-admin/edit.php8.73 ▲5.3753.22 ▲10.12
Add New Post /wp-admin/post-new.php13.44 ▲7.56110.05 ▲16.34
Media Library /wp-admin/upload.php8.54 ▲5.3136.84 ▲3.89
Layout Library /wp-admin/admin.php?page=content-views-blocklibrary8.5844.11
Add New /wp-admin/admin.php?page=content-views-add9.0148.74
All Views /wp-admin/edit.php?post_type=pt_view8.6437.99
Dashboard /wp-admin/admin.php?page=content-views8.5633.84
Settings /wp-admin/admin.php?page=content-views-setting8.5542.95

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 156 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
pt_cv_version

Browser metrics Passed 4 tests

An overview of browser requirements for Content Views - Post Grid Gutenberg Blocks and Shortcode
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,946 ▲18413.48 ▼0.879.32 ▲7.5928.76 ▼16.73
Dashboard /wp-admin2,236 ▲565.59 ▼0.0189.74 ▼9.6741.71 ▼4.68
Posts /wp-admin/edit.php2,144 ▲442.02 ▲0.0140.45 ▲3.5436.62 ▲1.89
Add New Post /wp-admin/post-new.php6,245 ▲4,71520.99 ▼1.911,026.27 ▲385.3660.88 ▲9.62
Media Library /wp-admin/upload.php1,435 ▲354.21 ▼0.0998.53 ▼2.1143.41 ▲0.33
Layout Library /wp-admin/admin.php?page=content-views-blocklibrary2,06611.92271.29143.02
Add New /wp-admin/admin.php?page=content-views-add4,11312.24160.26142.72
All Views /wp-admin/edit.php?post_type=pt_view1,1181.9230.1933.51
Dashboard /wp-admin/admin.php?page=content-views2,13116.06473.3069.28
Settings /wp-admin/admin.php?page=content-views-setting1,0942.4639.1238.80

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
These are user-side errors you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/grid1\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/list1\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/pinterest\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/collapsible\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/scrollable\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/timeline\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/onebig1\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/onebig2\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/overlay1\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/overlay2\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/overlay3\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/overlay4\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/overlay5\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/overlay6\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/overlay7\" is registered with an invalid category \"contentviews-blocks\".
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=content-views-add
    • > Console-api (warning) in wp-includes/js/dist/blocks.min.js?ver=b5d3b99262dfb659bd26+9:967
    The block \"contentviews/overlay8\" is registered with an invalid category \"contentviews-blocks\".
    • > GET request to /wp-admin/admin.php?page=content-views
    • > Other (warning) in unknown
    /wp-admin/admin.php?page=content-views 253 Unrecognized feature: 'web-share'.

Optimizations

Plugin configuration 90% 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
Please fix the following attributes:
  • Tags: Too many tags (17 tag instead of maximum 10); only the first 5 tags are used in your directory listing
Please take inspiration from this readme.txt

content-views-query-and-display-post-page/content-views.php 85% from 13 tests

The main PHP script in "Content Views - Post Grid Gutenberg Blocks and Shortcode" version 3.6.1.1 is automatically included on every request by WordPress
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("content-views-query-and-display-post-page.php" instead of "content-views.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 224 characters long)

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 detected11,820 lines of code in 132 files:
LanguageFilesBlank linesComment linesLines of code
PHP481,6702,1198,829
CSS122481131,933
JavaScript10104219768
SVG6200290

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity32.03
▷ Minimum class complexity1.00
▷ Maximum class complexity183.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity63.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes32
▷ Abstract classes00.00%
▷ Concrete classes32100.00%
▷ Final classes00.00%
Methods389
▷ Static methods31079.69%
▷ Public methods38498.71%
▷ Protected methods00.00%
▷ Private methods51.29%
Functions37
▷ Named functions3594.59%
▷ Anonymous functions25.41%
Constants22
▷ Global constants22100.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
5 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/images/sale.png6.45KB6.74KB0.00%
admin/assets/images/icon1.png1.60KB0.90KB▼ 43.96%
admin/assets/images/icon.png2.14KB1.99KB▼ 7.16%
public/assets/images/default_image.png0.91KB0.89KB▼ 3.10%
assets/select2/select2.png0.60KB0.99KB0.00%