83% post-lists-view-custom

Code Review | Post Lists View Custom

WordPress plugin Post Lists View Custom scored 83% from 54 tests.

About plugin

  • Plugin page: post-lists-view-c...
  • Plugin version: 1.7.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 5.8.1
  • First release: Oct 7, 2012
  • Latest release: Aug 13, 2015
  • Number of updates: 78
  • Update frequency: every 17.0 days
  • Top authors: gqevu6bsiz (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

1,000+ active / 19,345 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.44MB] [CPU: ▼138.69ms] Passed 4 tests

Analyzing server-side resources used by Post Lists View Custom
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.25 ▲0.5337.28 ▲14.27
Dashboard /wp-admin3.53 ▲0.4751.45 ▲4.97
Posts /wp-admin/edit.php3.59 ▲0.4858.23 ▲14.93
Add New Post /wp-admin/post-new.php5.83 ▲0.4097.94 ▼568.76
Media Library /wp-admin/upload.php3.41 ▲0.4034.98 ▼5.23
Post Lists View Custom /wp-admin/admin.php?page=post_lists_view_custom3.4134.21
Custom Post Type /wp-admin/admin.php?page=plvc_custom_posts3.3833.20
Available Widgets /wp-admin/admin.php?page=plvc_widgets3.3934.32
All Posts /wp-admin/admin.php?page=plvc_post3.4338.34
Comments /wp-admin/admin.php?page=plvc_comments3.4333.70
Menus advanced properties /wp-admin/admin.php?page=plvc_menus_adv3.3935.08
Users /wp-admin/admin.php?page=plvc_users3.4334.20
Media Library /wp-admin/admin.php?page=plvc_media3.4332.15
All Pages /wp-admin/admin.php?page=plvc_page3.4331.48
Other Settings /wp-admin/admin.php?page=plvc_other3.4234.86

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 29 new files
Database: no new tables, 2 new options
New WordPress options
plvc_regist_sortable_columns
plvc_regist_columns

Browser metrics Passed 4 tests

A check of browser resources used by Post Lists View Custom
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,782 ▲18716.22 ▲0.7112.41 ▲3.3046.74 ▲2.99
Dashboard /wp-admin3,049 ▲1155.92 ▼0.02159.43 ▲10.35117.05 ▲9.02
Posts /wp-admin/edit.php2,818 ▲792.71 ▼0.0072.87 ▼0.4985.88 ▲4.97
Add New Post /wp-admin/post-new.php1,664 ▼41021.49 ▲5.40289.90 ▼128.48102.48 ▼8.41
Media Library /wp-admin/upload.php1,886 ▲795.05 ▲0.02154.21 ▲2.01117.94 ▼17.70
Post Lists View Custom /wp-admin/admin.php?page=post_lists_view_custom1,5162.3967.5568.09
Custom Post Type /wp-admin/admin.php?page=plvc_custom_posts1,0982.3765.8671.57
Available Widgets /wp-admin/admin.php?page=plvc_widgets1,5142.3959.3379.98
All Posts /wp-admin/admin.php?page=plvc_post1,5292.6663.0580.47
Comments /wp-admin/admin.php?page=plvc_comments1,1632.3956.1068.77
Menus advanced properties /wp-admin/admin.php?page=plvc_menus_adv1,2722.4557.7277.05
Users /wp-admin/admin.php?page=plvc_users1,1602.3854.2171.88
Media Library /wp-admin/admin.php?page=plvc_media1,1632.3953.2576.87
All Pages /wp-admin/admin.php?page=plvc_page1,1632.3855.2776.87
Other Settings /wp-admin/admin.php?page=plvc_other1,6782.3856.0786.23

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 2 options
    • plvc_regist_sortable_columns
    • plvc_regist_columns

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/post-lists-view-custom/inc/information.php on line 3
    • > PHP Notice
      Trying to get property 'ClassConfig' of non-object in wp-content/plugins/post-lists-view-custom/inc/setting.php on line 5
    • > PHP Notice
      Trying to get property 'ClassData' of non-object in wp-content/plugins/post-lists-view-custom/inc/setting_other.php on line 5
    • > PHP Notice
      Trying to get property 'ClassConfig' of non-object in wp-content/plugins/post-lists-view-custom/inc/setting_select_post.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr_e() in wp-content/plugins/post-lists-view-custom/inc/information.php:9
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_data_others() on null in wp-content/plugins/post-lists-view-custom/inc/setting_other.php:5
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_all_custom_posts() on null in wp-content/plugins/post-lists-view-custom/inc/setting_select_post.php:5
    • > PHP Notice
      Trying to get property 'Plugin' of non-object in wp-content/plugins/post-lists-view-custom/inc/information.php on line 3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/post-lists-view-custom/inc/setting_menu.php:5
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/post-lists-view-custom/inc/setting_post.php:5

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 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Screenshots: Please add images for these screenshots: #1 (Settings Interface), #2 (Screen All Posts), #3 (Screen Media Library), #4 (Screen Navi Menus), #5 (Screen Widgets)
  • Tags: Please reduce the number of tags, currently 17 tag instead of maximum 10
The official readme.txt is a good inspiration

post-lists-view-custom/post-lists-view-custom.php 92% from 13 tests

The main file in "Post Lists View Custom" v. 1.7.4 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

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
Success! There were no dangerous files found in this plugin3,068 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP111,758812,502
PO File3172244413
CSS2203151
JavaScript1102

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity96.40
▷ Minimum class complexity8.00
▷ Maximum class complexity236.00
Average method complexity4.94
▷ Minimum method complexity1.00
▷ Maximum method complexity39.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods121
▷ Static methods00.00%
▷ Public methods10385.12%
▷ Protected methods00.00%
▷ Private methods1814.88%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.14MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/cell_width_not_auto_image.png15.59KB6.71KB▼ 56.93%
screenshot-5.png22.76KB9.75KB▼ 57.15%
images/cell_width_auto_image.png16.22KB7.03KB▼ 56.69%
screenshot-2.png20.51KB8.92KB▼ 56.49%
screenshot-3.png19.73KB8.25KB▼ 58.17%