77% ultimate-content-views

Code Review | Display Posts As List, Grid, Thumbs

WordPress plugin Display Posts As List, Grid, Thumbs scored77%from 54 tests.

About plugin

  • Plugin page: ultimate-content-...
  • Plugin version: 4.3
  • PHP compatiblity: 7.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.3.1
  • WordPress version: 6.3.1
  • First release: Nov 23, 2019
  • Latest release: Sep 20, 2023
  • Number of updates: 72
  • Update frequency: every 20.5 days
  • Top authors: wp-buy (66.67%)osamaesh (33.33%)codepressplugins (2.78%)

Code review

54 tests

User reviews

5 reviews

Install metrics

900+ active /10,099 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼6.93ms] Passed 4 tests

An overview of server-side resources used by Display Posts As List, Grid, Thumbs
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.18 ▼2.89
Dashboard /wp-admin3.35 ▲0.0144.93 ▼14.84
Posts /wp-admin/edit.php3.47 ▲0.1147.85 ▲6.13
Add New Post /wp-admin/post-new.php5.94 ▲0.0582.92 ▼4.87
Media Library /wp-admin/upload.php3.28 ▲0.0532.45 ▼5.12
Add New /wp-admin/post-new.php?post_type=wpucv_list3.3238.24
All Lists /wp-admin/edit.php?post_type=wpucv_list3.3236.76

Server storage [IO: ▲5.56MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 254 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
wpucv_preview_images_url

Browser metrics Passed 4 tests

A check of browser resources used by Display Posts As List, Grid, Thumbs
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19813.81 ▼0.469.39 ▲7.8941.80 ▲0.37
Dashboard /wp-admin2,225 ▲455.61 ▼0.0689.97 ▲5.8135.84 ▼3.24
Posts /wp-admin/edit.php2,130 ▲331.99 ▲0.0138.83 ▲3.6236.19 ▼1.64
Add New Post /wp-admin/post-new.php1,563 ▲3718.56 ▼4.97637.01 ▼54.4668.60 ▲3.96
Media Library /wp-admin/upload.php1,430 ▲304.16 ▲0.0394.54 ▼1.4840.35 ▼5.69
Add New /wp-admin/post-new.php?post_type=wpucv_list4,7365.65160.1884.70
All Lists /wp-admin/edit.php?post_type=wpucv_list1,1101.9830.3429.36

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • wpucv_preview_images_url
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
Almost there! Just fix the following items
  • 5× PHP files output text when accessed directly:
    • > /wp-content/plugins/ultimate-content-views/inc/preview/templates/template04.php
    • > /wp-content/plugins/ultimate-content-views/inc/preview/templates/template01.php
    • > /wp-content/plugins/ultimate-content-views/inc/preview/templates/template02.php
    • > /wp-content/plugins/ultimate-content-views/inc/preview/templates/template03.php
    • > /wp-content/plugins/ultimate-content-views/inc/preview/templates/template07.php
  • 27× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/ultimate-content-views/templates/template02.php:27
    • > PHP Fatal error
      Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/ultimate-content-views/templates/template07.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/ultimate-content-views/inc/options/list_structure.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/ultimate-content-views/inc/options/exclusion.php:6
    • > PHP Notice
      Undefined variable: the_query in wp-content/plugins/ultimate-content-views/templates/template07.php on line 3
    • > PHP Notice
      Undefined variable: the_query in wp-content/plugins/ultimate-content-views/templates/template02.php on line 27
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/ultimate-content-views/inc/preview/templates/template05.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/ultimate-content-views/inc/options/general.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/ultimate-content-views/inc/options/pagination.php:6
    • > PHP Notice
      Undefined variable: the_query in wp-content/plugins/ultimate-content-views/templates/template04.php on line 3

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots require images: #1 (screenshot-1), #2 (screenshot-2), #3 (screenshot-3), #4 (screenshot-4), #5 (screenshot-5), #6 (screenshot-6)
The official readme.txt might help

ultimate-content-views/ultimate-content-views.php 92% from 13 tests

Analyzing the main PHP file in "Display Posts As List, Grid, Thumbs" version 4.3
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 219 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected26,132 lines of code in 106 files:
LanguageFilesBlank linesComment linesLines of code
CSS1410013516,143
PHP246452643,985
SVG1002,671
JavaScript634262892,642
Sass2630682
Ruby1578
JSON1001

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
Please tend to the following items
  • Cyclomatic complexity of methods should be reduced to less than 100 (currently 104)
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity142.67
▷ Minimum class complexity19.00
▷ Maximum class complexity207.00
Average method complexity8.33
▷ Minimum method complexity1.00
▷ Maximum method complexity104.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods58
▷ Static methods4170.69%
▷ Public methods5187.93%
▷ Protected methods00.00%
▷ Private methods712.07%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
22 PNG files occupy 1.83MB with 1.17MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/owl.video.play.png4.86KB2.74KB▼ 43.61%
images/templates/temp03.png2.83KB2.23KB▼ 21.40%
screenshot-2.png139.44KB41.60KB▼ 70.17%
images/mobile.png3.03KB0.39KB▼ 87.00%
images/templates/temp05.png20.88KB0.93KB▼ 95.56%