10% mobiloud-smart-app-banner

Code Review | MobiLoud - Smart App Banners

WordPress plugin MobiLoud - Smart App Banners scored10%from 54 tests.

About plugin

  • Plugin page: mobiloud-smart-ap...
  • Plugin version: 1.1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.5
  • WordPress version: 6.3.1
  • First release: Sep 23, 2020
  • Latest release: Jan 29, 2021
  • Number of updates: 8
  • Update frequency: every 20.3 days
  • Top authors: minhnguyendev (75%)psac50 (37.5%)

Code review

54 tests

User reviews

2 reviews

Install metrics

500+ active /4,342 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
It is recommended to fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method MSAB::plugin_activation() should not be called statically

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.23ms] Passed 4 tests

An overview of server-side resources used by MobiLoud - Smart App Banners
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0245.15 ▼0.30
Dashboard /wp-admin3.35 ▲0.0561.59 ▲8.36
Posts /wp-admin/edit.php3.47 ▲0.1155.40 ▲5.76
Add New Post /wp-admin/post-new.php5.93 ▲0.0586.41 ▼12.34
Media Library /wp-admin/upload.php3.26 ▲0.0340.28 ▲1.97
Smart App Banners /wp-admin/options-general.php?page=msab3.2235.56

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for MobiLoud - Smart App Banners
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,047 ▲28614.94 ▲0.6610.11 ▲8.3642.14 ▼1.34
Dashboard /wp-admin2,338 ▲1616.16 ▲0.59108.05 ▲12.6940.27 ▼5.00
Posts /wp-admin/edit.php2,269 ▲1693.31 ▲1.3249.41 ▲12.1332.12 ▼6.40
Add New Post /wp-admin/post-new.php1,536 ▲1023.17 ▲0.06659.20 ▼45.4340.87 ▼18.14
Media Library /wp-admin/upload.php1,403 ▲64.14 ▼0.0394.57 ▼13.4447.92 ▲1.02
Smart App Banners /wp-admin/options-general.php?page=msab1,0293.0439.9926.22

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 50% from 4 tests

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-includes/class-wp-hook.php+310
    Non-static method MSAB::plugin_deactivation() should not be called statically
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded

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)
These server-side errors were triggered
    • > GET request to /wp-admin/options-general.php?page=msab
    • > Notice in wp-content/plugins/mobiloud-smart-app-banner/admin/class-msab-admin.php+241
    Trying to access array offset on value of type bool

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/mobiloud-smart-app-banner/includes/class-msab.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobiloud-smart-app-banner/admin/class-msab-admin.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
10 plugin tags: mobile app plugin, native app, android app, ios app, wordpress mobile app...

mobiloud-smart-app-banner/msab.php 85% from 13 tests

This is the main PHP file of "MobiLoud - Smart App Banners" version 1.1.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("mobiloud-smart-app-banner.php" instead of "msab.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 detected1,063 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript49523507
PHP46197304
CSS3199248
SVG1004

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity10.00
▷ Minimum class complexity7.00
▷ Maximum class complexity13.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods2291.67%
▷ Protected methods00.00%
▷ Private methods28.33%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
1 compressed PNG file occupies 0.06MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/images/google-play-get.png56.96KB56.15KB▼ 1.42%