67% wp-bannerize-pro

Code Review | WP Bannerize Pro

WordPress plugin WP Bannerize Pro scored 67% from 54 tests.

About plugin

  • Plugin page: wp-bannerize-pro
  • Plugin version: 1.6.9
  • PHP version: 7.4.16
  • WordPress compatibility: 5.6-6.0
  • WordPress version: 6.3.1
  • First release: Nov 28, 2016
  • Latest release: Jul 27, 2022
  • Number of updates: 99
  • Update frequency: every 20.9 days
  • Top authors: gfazioli (100%)

Code review

54 tests

User reviews

10 reviews

Install metrics

1,000+ active / 27,567 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.75MB] [CPU: ▼1.56ms] Passed 4 tests

Analyzing server-side resources used by WP Bannerize Pro
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.18 ▲0.7246.78 ▲6.10
Dashboard /wp-admin4.06 ▲0.7651.92 ▲3.61
Posts /wp-admin/edit.php4.18 ▲0.8252.43 ▲1.45
Add New Post /wp-admin/post-new.php6.64 ▲0.7687.34 ▼17.39
Media Library /wp-admin/upload.php3.98 ▲0.7643.34 ▲9.62
Settings /wp-admin/edit.php?post_type=wp_bannerize&page=wpbannerize_settings4.1738.74
Add New /wp-admin/post-new.php?post_type=wp_bannerize4.4160.36
Analytics Report /wp-admin/edit.php?post_type=wp_bannerize&page=wpbannerize_analitycs_report4.2645.85
Banners /wp-admin/edit.php?post_type=wp_bannerize4.1644.50
Analytics Overview /wp-admin/edit.php?post_type=wp_bannerize&page=wpbannerize_overview4.3144.70
Banner categories /wp-admin/edit-tags.php?taxonomy=wp_bannerize_tax&post_type=wp_bannerize3.9838.59

Server storage [IO: ▲18.43MB] [DB: ▲0.02MB] Passed 3 tests

Filesystem and database footprint
No storage issues were detected
Filesystem: 245 new files
Database: 3 new tables, 8 new options
New tables
wp_w_p_bannerize_clicks
wp_w_p_bannerize_impressions
wp_countries
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
wp_bannerize_pro_slug
widget_theysaidso_widget
theysaidso_admin_options
widget_wp-bannerize-widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for WP Bannerize Pro
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,007 ▲27214.05 ▼0.146.02 ▲4.2243.18 ▼2.00
Dashboard /wp-admin2,268 ▲825.80 ▲0.88106.46 ▼6.1639.31 ▼5.21
Posts /wp-admin/edit.php2,166 ▲772.05 ▲0.0535.86 ▼5.3632.74 ▼1.07
Add New Post /wp-admin/post-new.php1,578 ▲5023.52 ▲5.24636.65 ▲8.0160.87 ▲6.77
Media Library /wp-admin/upload.php1,453 ▲624.22 ▼0.0198.00 ▼0.9846.79 ▲1.74
Settings /wp-admin/edit.php?post_type=wp_bannerize&page=wpbannerize_settings9971.7125.7729.95
Add New /wp-admin/post-new.php?post_type=wp_bannerize2,8797.58151.0547.89
Analytics Report /wp-admin/edit.php?post_type=wp_bannerize&page=wpbannerize_analitycs_report1,4841.9426.0251.81
Banners /wp-admin/edit.php?post_type=wp_bannerize1,2512.5838.8229.28
Analytics Overview /wp-admin/edit.php?post_type=wp_bannerize&page=wpbannerize_overview1,3072.5947.9542.95
Banner categories /wp-admin/edit-tags.php?taxonomy=wp_bannerize_tax&post_type=wp_bannerize1,3302.1425.8727.85

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • Zombie tables were found after uninstall: 3 tables
    • wp_countries
    • wp_w_p_bannerize_impressions
    • wp_w_p_bannerize_clicks
  • This plugin did not uninstall successfully, leaving 8 options in the database
    • widget_wp-bannerize-widget
    • db_upgraded
    • widget_recent-posts
    • wp_bannerize_pro_slug
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 50% 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 everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 4× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-bannerize-pro/resources/views/cpt/thumbnail-txt.php
    • > /wp-content/plugins/wp-bannerize-pro/resources/views/help/banners-list.php
    • > /wp-content/plugins/wp-bannerize-pro/resources/views/cpt/thumbnail-not-available.php
    • > /wp-content/plugins/wp-bannerize-pro/resources/views/help/banners-edit.php
  • 58× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WPBannerize\\WPBones\\Database\\Migrations\\Migration' not found in wp-content/plugins/wp-bannerize-pro/database/migrations/2016_09_29_125122_create_wpbannerizeimpressions_table.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPBannerize\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wp-bannerize-pro/vendor/wpbones/wpbones/src/Html/HtmlTagLabel.php:5
    • > PHP Fatal error
      Trait 'WPBannerize\\WPBones\\Support\\Traits\\HasAttributes' not found in wp-content/plugins/wp-bannerize-pro/vendor/wpbones/wpbones/src/Html/HtmlTag.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'WPBannerize\\MorrisPHP\\Chart' not found in wp-content/plugins/wp-bannerize-pro/vendor/wpbones/morris-php/src/Bar.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPBannerize\\MorrisPHP\\Chart' not found in wp-content/plugins/wp-bannerize-pro/vendor/wpbones/morris-php/src/Donut.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WPBannerize\\WPBones\\Database\\Seeder' not found in wp-content/plugins/wp-bannerize-pro/vendor/wpbones/geolocalizer/src/database/seeds/countriesTableSeeder.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'WPBannerize\\WPBones\\Foundation\\Console\\Kernel' not found in wp-content/plugins/wp-bannerize-pro/plugin/Console/Kernel.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPBannerize\\WPBones\\Routing\\Controller' not found in wp-content/plugins/wp-bannerize-pro/plugin/Http/Controllers/Controller.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WPBannerize\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wp-bannerize-pro/vendor/wpbones/pure-css-switch/src/Html/HtmlTagSwitchButton.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WPBannerize\\WPBones\\Html\\HtmlTag' not found in wp-content/plugins/wp-bannerize-pro/vendor/wpbones/wpbones/src/Html/HtmlTagForm.php:5

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

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
8 plugin tags: impressions, ctr, adv, random, banner...

wp-bannerize-pro/index.php 69% from 13 tests

"WP Bannerize Pro" version 1.6.9's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Domain Path: Use only dashes and lowercase characters for the domain path ("localization")
  • Domain Path: Please prefix the domain path with a forward slash character ("/localization")
  • Main file name: Name the main plugin file the same as the plugin slug ("wp-bannerize-pro.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 detected15,475 lines of code in 208 files:
LanguageFilesBlank linesComment linesLines of code
PHP1513,2985,87611,996
CSS22115811
PO File2369526789
Markdown112620610
JSON800531
JavaScript99752378
LESS55418360

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity10.38
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity2.51
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces39
Interfaces2
Traits2
Classes91
▷ Abstract classes1516.48%
▷ Concrete classes7683.52%
▷ Final classes11.32%
Methods569
▷ Static methods9917.40%
▷ Public methods45079.09%
▷ Protected methods8915.64%
▷ Private methods305.27%
Functions50
▷ Named functions2448.00%
▷ Anonymous functions2652.00%
Constants18
▷ Global constants15.56%
▷ Class constants1794.44%
▷ Public constants17100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
23 PNG files occupy 3.38MB with 0.98MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png243.97KB64.60KB▼ 73.52%
assets/screenshot-8.png219.87KB62.52KB▼ 71.57%
public/images/logo-160x160.png7.61KB7.94KB0.00%
public/images/logo-80x80.png3.47KB3.55KB0.00%
public/images/logo-512x512.png43.56KB47.02KB0.00%