84% jetpack-widget-visibility-additional-fields-query-args

Code Review | Jetpack Widget Visibility - Query Args

WordPress plugin Jetpack Widget Visibility - Query Args scored 84% from 54 tests.

About plugin

  • Plugin page: jetpack-widget-vi...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.1-4.0.1
  • WordPress version: 6.3.1
  • First release: Dec 18, 2014
  • Latest release: Dec 18, 2014
  • Number of updates: 3
  • Update frequency: every 3.0 days
  • Top authors: drrobotnik (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 942 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
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼2.54ms] Passed 4 tests

Server-side resources used by Jetpack Widget Visibility - Query Args
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0336.36 ▼2.86
Dashboard /wp-admin3.33 ▲0.0244.31 ▼3.16
Posts /wp-admin/edit.php3.38 ▲0.0249.66 ▼5.76
Add New Post /wp-admin/post-new.php5.91 ▲0.0293.43 ▲2.35
Media Library /wp-admin/upload.php3.25 ▲0.0236.36 ▲1.61

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Jetpack Widget Visibility - Query Args
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲9013.54 ▼1.114.71 ▲3.0742.23 ▼3.58
Dashboard /wp-admin2,206 ▲184.84 ▼0.19108.95 ▼7.8141.78 ▼6.36
Posts /wp-admin/edit.php2,092 ▲32.05 ▼0.0044.44 ▲5.0536.46 ▲3.22
Add New Post /wp-admin/post-new.php1,519 ▼1023.24 ▲5.05589.51 ▼54.2052.44 ▼15.06
Media Library /wp-admin/upload.php1,382 ▼64.20 ▲0.0193.60 ▼11.1440.43 ▼2.44

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
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
The following issues need your attention
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/jetpack-widget-visibility-additional-fields-query-args/jetpack-widget-visibility-query-args.php:83

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
4 plugin tags: visibility, extend, jetpack, widget

jetpack-widget-visibility-additional-fields-query-args/jetpack-widget-visibility-query-args.php 92% from 13 tests

The main PHP script in "Jetpack Widget Visibility - Query Args" version 1.0.0 is automatically included on every request by WordPress
It is important to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("jetpack-widget-visibility-additional-fields-query-args.php" instead of "jetpack-widget-visibility-query-args.php")

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 detected64 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP118864

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.45
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
3 PNG files occupy 0.08MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png30.79KB8.60KB▼ 72.08%
assets/screenshot-1.png10.93KB3.20KB▼ 70.76%
assets/wpml-lang.png35.40KB10.20KB▼ 71.19%