79% gui-for-lcp

Code Review | GUI for List Category Posts

WordPress plugin GUI for List Category Posts scored79%from 54 tests.

About plugin

  • Plugin page: gui-for-lcp
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.1
  • WordPress version: 6.3.1
  • First release: Oct 5, 2018
  • Latest release: Mar 16, 2023
  • Number of updates: 8
  • Update frequency: every 202.9 days
  • Top authors: zymeth25 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

800+ active /7,541 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼5.64ms] Passed 4 tests

This is a short check of server-side resources used by GUI for List Category Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.70 ▼3.90
Dashboard /wp-admin3.32 ▲0.0142.17 ▼4.84
Posts /wp-admin/edit.php3.37 ▲0.0144.83 ▼0.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0280.13 ▼12.91
Media Library /wp-admin/upload.php3.24 ▲0.0134.46 ▼0.46

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 27 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for GUI for List Category Posts
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.72 ▼0.581.77 ▲0.0239.27 ▲0.64
Dashboard /wp-admin2,210 ▲225.06 ▲0.16107.33 ▼4.5738.68 ▼2.51
Posts /wp-admin/edit.php2,090 ▲12.05 ▲0.0439.27 ▼0.9433.58 ▼0.18
Add New Post /wp-admin/post-new.php1,546 ▲723.26 ▲0.27666.49 ▲45.2835.41 ▼18.19
Media Library /wp-admin/upload.php1,425 ▲344.40 ▲0.17101.35 ▲5.2243.10 ▲0.35

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 0% 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 take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/gui-for-lcp/admin/templates/tmpl-taxonomy-terms.php
  • 6× PHP files trigger server errors when accessed directly:
    • > PHP Warning
      require_once(ABSPATH/wp-admin/includes/class-walker-category-checklist.php): failed to open stream: No such file or directory in wp-content/plugins/gui-for-lcp/includes/class-gflcp-walker-category-checklist.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gui-for-lcp/admin/templates/tmpl-display-options.php:16
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATH/wp-admin/includes/class-walker-category-checklist.php' (include_path='.:/usr/share/php') in wp-content/plugins/gui-for-lcp/includes/class-gflcp-walker-category-checklist.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gui-for-lcp/admin/templates/tmpl-modal-content.php:16
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/gui-for-lcp/includes/class-gflcp-walker-category-checklist.php on line 16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/gui-for-lcp/admin/templates/tmpl-select-options.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: list, gui, categories, posts

gui-for-lcp/gui-for-lcp.php Passed 13 tests

This is the main PHP file of "GUI for List Category Posts" version 2.0.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
124 characters long description:
This plugin adds a graphical shortcode creator for List Category Posts, accessible via the "LCP" button in WordPress editor.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,886 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP11984391,142
CSS22535694
SVG10049
JavaScript1011

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.06
Average class complexity3.60
▷ Minimum class complexity1.00
▷ Maximum class complexity7.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity5.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods1777.27%
▷ Protected methods00.00%
▷ Private methods522.73%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
6 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/assets/vendors/jquery-ui/images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
admin/assets/vendors/jquery-ui/images/ui-icons_cc0000_256x240.png4.44KB4.17KB▼ 6.02%
admin/assets/vendors/jquery-ui/images/ui-icons_444444_256x240.png6.83KB4.17KB▼ 38.86%
admin/assets/vendors/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
admin/assets/vendors/jquery-ui/images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%