68% push-down-banners

Code Review | Push Down Banners

WordPress plugin Push Down Banners scored68%from 54 tests.

About plugin

  • Plugin page: push-down-banners
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Jan 12, 2016
  • Latest release: Feb 11, 2016
  • Number of updates: 9
  • Update frequency: every 3.6 days
  • Top authors: melodicmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,558 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by Push Down Banners
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.23 ▼9.99
Dashboard /wp-admin3.34 ▼0.0048.99 ▼15.42
Posts /wp-admin/edit.php3.39 ▲0.0453.53 ▼0.25
Add New Post /wp-admin/post-new.php5.92 ▲0.0488.43 ▼17.52
Media Library /wp-admin/upload.php3.26 ▲0.0434.58 ▼0.42
/wp-admin/admin.php?page=push_preview_banner3.2032.41
Push Down Banners /wp-admin/admin.php?page=push_pushdown_top3.2339.90
Daily Stats /wp-admin/admin.php?page=push_daily_stat3.2036.46
Add New Pushdown Banner /wp-admin/admin.php?page=new_pushdown_banner3.2532.56

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 44 new files
Database: 1 new table, 6 new options
New tables
wp_daily_stats
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

This is an overview of browser requirements for Push Down Banners
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,868 ▲12213.73 ▼0.6410.30 ▲8.3339.76 ▼6.21
Dashboard /wp-admin2,232 ▲414.93 ▲0.05111.36 ▲2.9368.90 ▲22.07
Posts /wp-admin/edit.php2,131 ▲422.01 ▼0.0237.43 ▼0.6638.31 ▲2.26
Add New Post /wp-admin/post-new.php1,551 ▲3123.17 ▼0.04766.22 ▲93.0838.32 ▼29.80
Media Library /wp-admin/upload.php1,420 ▲294.18 ▼0.0298.73 ▼6.9676.17 ▲29.53
/wp-admin/admin.php?page=push_preview_banner8221.8826.3221.20
Push Down Banners /wp-admin/admin.php?page=push_pushdown_top8582.0625.6430.35
Daily Stats /wp-admin/admin.php?page=push_daily_stat8612.0625.1129.30
Add New Pushdown Banner /wp-admin/admin.php?page=new_pushdown_banner1,3813.1352.6982.37

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
Please fix the following items
  • Zombie tables were found after uninstall: 1 table
    • wp_daily_stats
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+425
    Undefined index: imageoption
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+426
    Undefined index: bannertype
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+427
    Undefined index: bgcolor
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+428
    Undefined index: backname
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+429
    Undefined index: mainnewwindow
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+430
    Undefined index: bannername
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+431
    Undefined index: mainname
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+432
    Undefined index: firstonpage
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+433
    Undefined index: showonpage
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+434
    Undefined index: responsive
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+435
    Undefined index: abovecss
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+436
    Undefined index: belowcss
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+440
    Undefined index: mainurl
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+441
    Undefined index: autoopen
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+442
    Undefined index: autoclose
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+443
    Undefined index: autoopentime
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+444
    Undefined index: autoclosetime
    • > GET request to /wp-admin/admin.php?page=push_preview_banner
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+445
    Undefined index: onceperday
    • > GET request to /wp-admin/admin.php?page=push_daily_stat
    • > Notice in wp-content/plugins/push-down-banners/pushdownoptions.php+528
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=new_pushdown_banner
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/admin.php?page=new_pushdown_banner
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=push_daily_stat
    • > Network (severe)
    wp-content/plugins/push-down-banners/images/wp_push_buy_em.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
Attributes that require attention:
  • Tags: Please reduce the number of tags, currently 11 tag instead of maximum 10
The official readme.txt is a good inspiration

push-down-banners/pushdownbanner.php 92% from 13 tests

The main PHP script in "Push Down Banners" version 1.3 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("push-down-banners.php" instead of "pushdownbanner.php")

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
Good job! No executable or dangerous file extensions detected6,633 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript3313253,679
PO File92,3114,9011,957
PHP224028997

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions28
▷ Named functions28100.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
13 PNG files occupy 0.20MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/imageicon.png145.05KB48.05KB▼ 66.87%
images/html.png5.29KB2.74KB▼ 48.23%
images/close-whitetext.png1.74KB1.50KB▼ 13.43%
images/melodic_logo.png6.49KB3.42KB▼ 47.37%
images/edit.png2.56KB1.45KB▼ 43.36%