73% widget-extend-builtin-query

Code Review | Built-in Widgets Query extend (Custom Post Types & more)

WordPress plugin Built-in Widgets Query extend (Custom Post Types & more) scored73%from 54 tests.

About plugin

  • Plugin page: widget-extend-bui...
  • Plugin version: 1.06
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4+
  • WordPress version: 6.3.1
  • First release: Feb 28, 2020
  • Latest release: Jul 30, 2022
  • Number of updates: 24
  • Update frequency: every 36.8 days
  • Top authors: ttodua (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /780 total downloads

Benchmarks

Plugin footprint 65% 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.42MB] [CPU: ▼1.33ms] Passed 4 tests

An overview of server-side resources used by Built-in Widgets Query extend (Custom Post Types & more)
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4441.36 ▲3.33
Dashboard /wp-admin3.72 ▲0.4247.03 ▼2.77
Posts /wp-admin/edit.php3.77 ▲0.4250.64 ▲1.64
Add New Post /wp-admin/post-new.php6.44 ▲0.5685.20 ▼7.51
Media Library /wp-admin/upload.php3.64 ▲0.4239.17 ▲7.75
Add New /wp-admin/post-new.php?post_type=movies6.4391.84
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=movies3.6439.96
Movies /wp-admin/edit.php?post_type=movies3.7042.00

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 6 new files
Database: 1 new table, 8 new options
New tables
wp_widget_extend_builtin_query__errors_log
New WordPress options
db_upgraded
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
widget-extend-builtin-query
widget_theysaidso_widget
can_compress_scripts
category_children

Browser metrics Passed 4 tests

An overview of browser requirements for Built-in Widgets Query extend (Custom Post Types & more)
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,862 ▲11613.34 ▼1.421.77 ▲0.0442.25 ▼7.73
Dashboard /wp-admin2,240 ▲554.88 ▼0.93100.32 ▼15.9939.34 ▼5.13
Posts /wp-admin/edit.php2,123 ▲342.01 ▼0.0039.75 ▲0.4435.09 ▲1.31
Add New Post /wp-admin/post-new.php1,562 ▲3323.15 ▲0.08657.97 ▼23.9654.19 ▲1.12
Media Library /wp-admin/upload.php1,425 ▲374.39 ▲0.25105.25 ▲5.4647.24 ▲4.20
Add New /wp-admin/post-new.php?post_type=movies1,55817.04824.3830.86
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=movies1,4742.1427.1931.99
Movies /wp-admin/edit.php?post_type=movies1,1392.0030.5130.23

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_widget_extend_builtin_query__errors_log
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • category_children
    • widget-extend-builtin-query

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 50% from 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
Please fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Puvox\\library' not found in wp-content/plugins/widget-extend-builtin-query/library_wp.php:25

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Contributors: Plugin contributors not specified
You can take inspiration from this readme.txt

widget-extend-builtin-query/index.php 92% from 13 tests

The principal PHP file in "Built-in Widgets Query extend (Custom Post Types & more)" v. 1.06 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("widget-extend-builtin-query.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Good job! No executable or dangerous file extensions detected3,565 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31,2675,1143,565

PHP code 50% from 2 tests

An overview of cyclomatic complexity and code structure
It is recommended to fix the following
  • Please reduce cyclomatic complexity of classes to less than 1000 (currently 1,076)
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity347.00
▷ Minimum class complexity12.00
▷ Maximum class complexity1,076.00
Average method complexity2.96
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods855
▷ Static methods10211.93%
▷ Public methods84799.06%
▷ Protected methods00.00%
▷ Private methods80.94%
Functions90
▷ Named functions00.00%
▷ Anonymous functions90100.00%
Constants3
▷ Global constants3100.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
No PNG files were detected