93% widget-visibility-without-jetpack

Code Review | Widget Visibility Without Jetpack

WordPress plugin Widget Visibility Without Jetpack scored 93% from 54 tests.

About plugin

  • Plugin page: widget-visibility...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.0-4.4
  • WordPress version: 5.8.1
  • First release: Sep 20, 2013
  • Latest release: Apr 18, 2017
  • Number of updates: 23
  • Update frequency: every 56.8 days
  • Top authors: boluda (95.65%)unitepress (8.7%)

Code review

54 tests

User reviews

10 reviews

Install metrics

8,000+ active / 28,822 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by Widget Visibility Without Jetpack
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1234.45 ▲13.26
Dashboard /wp-admin3.07 ▲0.0148.46 ▲4.46
Posts /wp-admin/edit.php3.12 ▲0.0141.45 ▼4.29
Add New Post /wp-admin/post-new.php5.43 ▼0.0091.05 ▼559.23
Media Library /wp-admin/upload.php3.01 ▲0.0035.97 ▼2.72

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Widget Visibility Without Jetpack
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,678 ▲8215.87 ▲0.288.72 ▼1.2447.09 ▼1.97
Dashboard /wp-admin2,973 ▲425.96 ▼0.06132.56 ▼7.69111.97 ▼4.44
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0062.97 ▼0.4581.72 ▼6.38
Add New Post /wp-admin/post-new.php1,683 ▼18918.77 ▼0.37369.97 ▼0.36107.51 ▼2.80
Media Library /wp-admin/upload.php1,807 ▼05.03 ▲0.01144.80 ▼7.23120.47 ▼2.82

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The plugin uninstalled successfully, without leaving any zombie files or tables

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 no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/widget-visibility-without-jetpack/widget-visibility-without-jetpack.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-visibility-without-jetpack/widget-visibility/widget-conditions.php:698

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 90% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === widget-visibility-without-jetpack === )
Please take inspiration from this readme.txt

widget-visibility-without-jetpack/widget-visibility-without-jetpack.php 85% from 13 tests

"Widget Visibility Without Jetpack" version 1.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
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
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 190 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin1,059 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP29886531
PO File28488252
CSS2101143
JavaScript1369133

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.61
Average class complexity155.00
▷ Minimum class complexity155.00
▷ Maximum class complexity155.00
Average method complexity12.00
▷ Minimum method complexity1.00
▷ Maximum method complexity80.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods14
▷ Static methods14100.00%
▷ Public methods14100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin