84% smart-app-banner

Code Review | Smart App Banner

WordPress plugin Smart App Banner scored84%from 54 tests.

About plugin

  • Plugin page: smart-app-banner
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2.2
  • WordPress version: 6.3.1
  • First release: Jun 24, 2012
  • Latest release: May 21, 2023
  • Number of updates: 78
  • Update frequency: every 51.1 days
  • Top authors: stephend (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

1,000+ active /20,392 total downloads

Benchmarks

Plugin footprint 83% from 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.64MB] [CPU: ▼16.24ms] Passed 4 tests

An overview of server-side resources used by Smart App Banner
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0641.60 ▲4.25
Dashboard /wp-admin3.37 ▲0.0645.34 ▼2.44
Posts /wp-admin/edit.php3.42 ▲0.0650.89 ▲1.47
Add New Post /wp-admin/post-new.php3.15 ▼2.7434.71 ▼67.02
Media Library /wp-admin/upload.php3.29 ▲0.0634.63 ▲3.05
Smart App Banner /wp-admin/options-general.php?page=wsl-smart-app-banner3.2631.90

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Smart App Banner
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.47 ▲0.201.70 ▼0.2443.36 ▼6.13
Dashboard /wp-admin2,207 ▲195.79 ▲0.90101.03 ▼7.6940.01 ▼3.63
Posts /wp-admin/edit.php2,093 ▲41.99 ▼0.0340.47 ▼2.2835.35 ▲0.04
Add New Post /wp-admin/post-new.php6,259 ▲4,74019.18 ▼3.92966.75 ▲324.8564.52 ▲12.72
Media Library /wp-admin/upload.php1,392 ▲44.17 ▼0.0395.35 ▼4.7140.29 ▼7.49
Smart App Banner /wp-admin/options-general.php?page=wsl-smart-app-banner9292.0324.5931.62

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
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/smart-app-banner/wsl-smart-app-banner.php:96

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

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === smart-app-banner === )
You can look at the official readme.txt

smart-app-banner/wsl-smart-app-banner.php 92% from 13 tests

"Smart App Banner" version 1.1.3's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Main file name: The principal plugin file should be the same as the plugin slug ("smart-app-banner.php" instead of "wsl-smart-app-banner.php")

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 detected356 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP18357316
PO File1121440

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
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%
Functions7
▷ Named functions7100.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
PNG images were not found in this plugin