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

Code Review | Content Views - Post Grid & Filter for WordPress

WordPress plugin Content Views - Post Grid & Filter for WordPress scored 99% from 54 tests.

About plugin

  • Plugin page: content-views-que...
  • Plugin version: 2.4.0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.8
  • WordPress version: 5.8.1
  • First release: May 28, 2014
  • Latest release: Jul 19, 2021
  • Number of updates: 261
  • Update frequency: every 10.1 days
  • Top authors: PT Guy (100%)

Code review

54 tests

User reviews

309 reviews

Install metrics

100,000+ active / 2,578,462 total downloads

Benchmarks

Plugin footprint Passed 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: ▲0.90MB] [CPU: ▼135.66ms] Passed 4 tests

A check of server-side resources used by Content Views - Post Grid & Filter for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.8742.96 ▲21.11
Dashboard /wp-admin3.98 ▲0.9257.51 ▲5.92
Posts /wp-admin/edit.php4.03 ▲0.9250.34 ▲7.89
Add New Post /wp-admin/post-new.php6.33 ▲0.8994.81 ▼560.72
Media Library /wp-admin/upload.php3.91 ▲0.9137.11 ▲4.27
All Views /wp-admin/edit.php?post_type=pt_view3.9536.13
Add New /wp-admin/admin.php?page=content-views-add4.1741.86
Settings /wp-admin/admin.php?page=content-views3.9136.86

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 54 new files
Database: no new tables, 1 new option
New WordPress options
pt_cv_version

Browser metrics Passed 4 tests

An overview of browser requirements for Content Views - Post Grid & Filter for WordPress
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,864 ▲26816.39 ▲0.7821.34 ▲12.2750.72 ▲4.04
Dashboard /wp-admin3,012 ▲815.98 ▲0.02139.76 ▼5.26101.70 ▼8.10
Posts /wp-admin/edit.php2,781 ▲422.72 ▼0.0063.36 ▼4.9992.87 ▼0.04
Add New Post /wp-admin/post-new.php1,900 ▲28519.14 ▼1.74372.49 ▲86.82110.90 ▼2.66
Media Library /wp-admin/upload.php1,849 ▲425.03 ▲0.02149.99 ▲6.77122.37 ▲1.71
All Views /wp-admin/edit.php?post_type=pt_view1,4622.6259.1779.32
Add New /wp-admin/admin.php?page=content-views-add3,1993.9888.74127.57
Settings /wp-admin/admin.php?page=content-views1,4462.7769.4791.76

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests Passed 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 Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

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 (12 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 & Filter for WordPress" version 2.4.0.2 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 159 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 detected5,936 lines of code in 40 files:
LanguageFilesBlank linesComment linesLines of code
PHP241,0231,9744,789
JavaScript692213612
CSS96372306
SVG100229

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.40
Average class complexity48.91
▷ Minimum class complexity10.00
▷ Maximum class complexity178.00
Average method complexity3.65
▷ Minimum method complexity1.00
▷ Maximum method complexity62.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods199
▷ Static methods17688.44%
▷ Public methods19798.99%
▷ Protected methods00.00%
▷ Private methods21.01%
Functions29
▷ Named functions29100.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
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/select2/select2.png0.60KB0.99KB0.00%
admin/assets/images/icon.png1.60KB0.90KB▼ 43.96%