10% smart-app-banners

Code Review | Smart App Banners

WordPress plugin Smart App Banners scored10%from 54 tests.

About plugin

  • Plugin page: smart-app-banners
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-3.8.1
  • WordPress version: 6.3.1
  • First release: Apr 19, 2013
  • Latest release: Feb 25, 2014
  • Number of updates: 23
  • Update frequency: every 13.9 days
  • Top authors: clevelandwebdeveloper (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

30+ active /6,506 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/smart-app-banners/index.php+781
    Function create_function() is deprecated

Server metrics [RAM: ▼1.71MB] [CPU: ▼53.59ms] Passed 4 tests

Server-side resources used by Smart App Banners
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.28 ▼1.196.67 ▼41.23
Dashboard /wp-admin2.30 ▼1.017.83 ▼41.64
Posts /wp-admin/edit.php2.30 ▼1.068.00 ▼37.25
Add New Post /wp-admin/post-new.php2.30 ▼3.598.04 ▼94.22
Media Library /wp-admin/upload.php2.30 ▼0.937.25 ▼28.44
Smart App Banners /wp-admin/options-general.php?page=smart_app_banners-setting-admin2.306.76

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

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

Browser metrics Passed 4 tests

Smart App Banners: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.47 ▲0.091.76 ▼0.1244.26 ▼1.55
Dashboard /wp-admin2,218 ▲275.83 ▼0.2194.82 ▼22.3539.57 ▼3.58
Posts /wp-admin/edit.php2,103 ▲112.01 ▲0.0238.60 ▼2.4535.23 ▼4.96
Add New Post /wp-admin/post-new.php6,319 ▲4,78219.35 ▼3.94843.67 ▲207.3754.70 ▲4.38
Media Library /wp-admin/upload.php1,406 ▲154.26 ▲0.0896.08 ▼11.1745.22 ▲2.09
Smart App Banners /wp-admin/options-general.php?page=smart_app_banners-setting-admin8682.2130.2733.36

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 cannot be uninstalled
    • > Deprecated in wp-content/plugins/smart-app-banners/index.php+781
    Function create_function() is deprecated
  • The uninstall procedure has failed, leaving 8 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_smart_app_banners_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_smart_app_android_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
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=smart_app_banners-setting-admin
    • > Deprecated in wp-content/plugins/smart-app-banners/index.php+988
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=smart_app_banners-setting-admin
    • > Warning in wp-content/plugins/smart-app-banners/index.php(781) : runtime-created function+1
    Use of undefined constant smart_app_banners_widget - assumed 'smart_app_banners_widget' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=smart_app_banners-setting-admin
    • > Warning in wp-content/plugins/smart-app-banners/index.php(988) : runtime-created function+1
    Use of undefined constant smart_app_android_widget - assumed 'smart_app_android_widget' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=smart_app_banners-setting-admin
    • > 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/options-general.php?page=smart_app_banners-setting-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=smart_app_banners-setting-admin
    • > Warning in wp-content/plugins/smart-app-banners/index.php+242
    Use of undefined constant placeholder - assumed 'placeholder' (this will throw an Error in a future version of PHP)
  • 7 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=smart_app_banners-setting-admin
    • > Warning in wp-content/plugins/smart-app-banners/index.php+233
    Use of undefined constant id - assumed 'id' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=smart_app_banners-setting-admin
    • > Notice in wp-content/plugins/smart-app-banners/index.php+245
    Undefined index: default
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=smart_app_banners-setting-admin
    • > Warning in wp-content/plugins/smart-app-banners/index.php+233
    Use of undefined constant desc - assumed 'desc' (this will throw an Error in a future version of PHP)
    • > GET request to /wp-admin/options-general.php?page=smart_app_banners-setting-admin
    • > Notice in wp-content/plugins/smart-app-banners/index.php+246
    Undefined index: desc

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
The following issues need your attention
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/smart-app-banners/index.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 15 tag instead of maximum 10
  • Screenshots: These screenshots lack descriptions #2, #3, #4, #5 in smart-app-banners/assets to your readme.txt
Please take inspiration from this readme.txt

smart-app-banners/index.php 85% from 13 tests

The principal PHP file in "Smart App Banners" v. 1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 350 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("smart-app-banners.php" instead of "index.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
No dangerous file extensions were detected733 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1206198584
PO File24242149

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity17.50
▷ Minimum class complexity14.00
▷ Maximum class complexity20.00
Average method complexity3.13
▷ Minimum method complexity1.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.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

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/download_on_the_app_store.png9.37KB5.86KB▼ 37.43%
images/download_for_android.png10.91KB4.37KB▼ 59.89%