68% expandable-banners

Code Review | Expandable Banners

WordPress plugin Expandable Banners scored68%from 54 tests.

About plugin

  • Plugin page: expandable-banners
  • Plugin version: 1.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Jan 8, 2016
  • Latest release: Feb 11, 2016
  • Number of updates: 13
  • Update frequency: every 2.6 days
  • Top authors: melodicmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,425 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.43MB] [CPU: ▼3.19ms] Passed 4 tests

This is a short check of server-side resources used by Expandable Banners
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.4239.29 ▲0.56
Dashboard /wp-admin3.74 ▲0.4452.51 ▲0.07
Posts /wp-admin/edit.php3.86 ▲0.5051.99 ▼0.20
Add New Post /wp-admin/post-new.php6.32 ▲0.4387.58 ▼13.17
Media Library /wp-admin/upload.php3.66 ▲0.4339.71 ▲0.88
Expandable Banners /wp-admin/admin.php?page=exp_expandable_top3.6336.06
Daily Stats /wp-admin/admin.php?page=exp_expandable_daily_stat3.6132.94
/wp-admin/admin.php?page=exp_preview_banner3.6133.46
Add New Expandable Banner /wp-admin/admin.php?page=new_expandable_banner3.6535.62

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Expandable Banners
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,857 ▲9614.80 ▲0.184.70 ▲2.9142.98 ▲1.65
Dashboard /wp-admin2,230 ▲505.56 ▲0.0290.43 ▲0.7679.67 ▲36.51
Posts /wp-admin/edit.php2,138 ▲382.01 ▼0.0339.68 ▼0.0234.56 ▼1.33
Add New Post /wp-admin/post-new.php1,560 ▲3223.07 ▲0.09675.13 ▼8.02177.19 ▲103.41
Media Library /wp-admin/upload.php1,435 ▲354.15 ▼0.02109.53 ▲9.1076.69 ▲31.01
Expandable Banners /wp-admin/admin.php?page=exp_expandable_top8702.0325.1027.28
Daily Stats /wp-admin/admin.php?page=exp_expandable_daily_stat8702.0325.1930.92
/wp-admin/admin.php?page=exp_preview_banner8451.8525.7223.31
Add New Expandable Banner /wp-admin/admin.php?page=new_expandable_banner1,9353.1844.4174.87

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 1 table in the database
    • wp_daily_stats
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=exp_expandable_daily_stat
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+936
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+570
    Undefined index: bannername
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+572
    Undefined index: bannertype
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+573
    Undefined index: pagetitle
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+574
    Undefined index: beforediv
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+575
    Undefined index: firstonpage
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+576
    Undefined index: hasjavascript
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+577
    Undefined index: showonpage
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+578
    Undefined index: addextra
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+579
    Undefined index: extracode
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+580
    Undefined index: abovecss
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+581
    Undefined index: belowcss
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+582
    Undefined index: divid
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+583
    Undefined index: useclosebutton
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+584
    Undefined index: closebuttonposition
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+585
    Undefined index: flashclose
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+586
    Undefined index: firstbackup
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+587
    Undefined index: mainbackup
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+588
    Undefined index: animationspeed
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+589
    Undefined index: mainnewwindow
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+590
    Undefined index: firsthtml
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+591
    Undefined index: htmbannertype
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+592
    Undefined index: mainhtmfile
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+593
    Undefined index: mainhtml
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+594
    Undefined index: responsive
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+595
    Undefined index: screensize
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+596
    Undefined index: minscreen
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+597
    Undefined index: maxscreen
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+599
    Undefined index: firsthtmlwidth
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+600
    Undefined index: mainhtmlwidth
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+601
    Undefined index: firsthtmlheight
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+602
    Undefined index: mainhtmlheight
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+603
    Undefined index: firstflashname
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+604
    Undefined index: mainflashname
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+605
    Undefined index: bannerid
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+606
    Undefined index: mainname
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+607
    Undefined index: mainurl
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+608
    Undefined index: expandon
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+609
    Undefined index: expanddirection
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+610
    Undefined index: autoopen
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+611
    Undefined index: autoclose
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+612
    Undefined index: autoopentime
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+613
    Undefined index: autoclosetime
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+614
    Undefined index: onceperday
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+615
    Undefined index: firstname
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+616
    Undefined index: animate
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+617
    Undefined index: cornerpeel
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+618
    Undefined index: htmlcloseoutside
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+619
    Undefined index: closename
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+657
    Undefined variable: close
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=exp_preview_banner
    • > Notice in wp-content/plugins/expandable-banners/expandableoptions.php+657
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=new_expandable_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_expandable_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 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=exp_expandable_daily_stat
    • > Network (severe)
    wp-content/plugins/expandable-banners/images/wp_exp_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

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need to be fixed: You can look at the official readme.txt

expandable-banners/expandablebanner.php 92% from 13 tests

This is the main PHP file of "Expandable Banners" version 1.5, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("expandable-banners.php" instead of "expandablebanner.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin6,437 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PO File91,5682,0003,351
PHP2331421,762
JavaScript3393451,324

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions27
▷ Named functions27100.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
13 PNG files occupy 0.19MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/delete.png1.85KB1.53KB▼ 17.70%
images/melodic_logo.png6.49KB3.42KB▼ 47.37%
images/close-blacktext.png1.73KB1.51KB▼ 13.08%
images/imageicon.png145.05KB48.05KB▼ 66.87%
images/preview.png1.75KB1.46KB▼ 16.31%