84% simple-widget-display-conditions-lite

Code Review | Simple widget display conditions Lite

WordPress plugin Simple widget display conditions Lite scored 84% from 54 tests.

About plugin

  • Plugin page: simple-widget-dis...
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.2.4
  • WordPress version: 6.3.1
  • First release: Oct 19, 2019
  • Latest release: Oct 19, 2019
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: yossybunny (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 9,040 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.09MB] [CPU: ▼5.41ms] Passed 4 tests

This is a short check of server-side resources used by Simple widget display conditions Lite
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0937.65 ▼4.89
Dashboard /wp-admin3.40 ▲0.1044.11 ▼2.10
Posts /wp-admin/edit.php3.45 ▲0.0946.24 ▲0.95
Add New Post /wp-admin/post-new.php5.98 ▲0.0980.65 ▼9.48
Media Library /wp-admin/upload.php3.32 ▲0.0934.75 ▼5.17
Simple widget display conditions Lite /wp-admin/options-general.php?page=simple-widget-display-conditions-lite3.2931.07

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Simple widget display conditions Lite
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,808 ▲7313.27 ▼1.041.46 ▼0.2539.91 ▲2.99
Dashboard /wp-admin2,208 ▲195.86 ▼0.07103.38 ▼2.2539.97 ▼0.07
Posts /wp-admin/edit.php2,097 ▲82.02 ▲0.0238.64 ▲1.5536.34 ▲4.46
Add New Post /wp-admin/post-new.php1,521 ▼1217.46 ▼5.69691.39 ▲11.2967.94 ▲13.58
Media Library /wp-admin/upload.php1,396 ▲84.24 ▼0.0395.83 ▼20.4340.45 ▼9.21
Simple widget display conditions Lite /wp-admin/options-general.php?page=simple-widget-display-conditions-lite8832.0227.8637.71

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not 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
Almost there! Just fix the following items
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_plugin_active() in wp-content/plugins/simple-widget-display-conditions-lite/simple-widget-display-conditions-lite.php:14
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/simple-widget-display-conditions-lite/simple-widget-display-conditions-lite.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/simple-widget-display-conditions-lite/swdcl-admin.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-widget-display-conditions-lite/widget-form.php:77
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/simple-widget-display-conditions-lite/conditions-filter.php:127
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/simple-widget-display-conditions-lite/simple-widget-display-conditions-lite.php on line 13
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/simple-widget-display-conditions-lite/simple-widget-display-conditions-lite.php on line 13

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: widget

simple-widget-display-conditions-lite/simple-widget-display-conditions-lite.php 92% from 13 tests

The principal PHP file in "Simple widget display conditions Lite" v. 1.0.0 is loaded by WordPress automatically on each request
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 157 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected497 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP46310255
CSS230242

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.78
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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.02MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/swdc_img1.png3.60KB3.61KB0.00%
images/swdcl_ja.png8.63KB8.57KB▼ 0.74%
images/swdc_ja_img1.png3.74KB3.71KB▼ 0.83%
images/swdcl.png8.26KB8.21KB▼ 0.63%