84% banner-creator

Code Review | Banner Ad Creator

WordPress plugin Banner Ad Creator scored84%from 54 tests.

About plugin

  • Plugin page: banner-creator
  • Plugin version: 1.1
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.0
  • WordPress version: 6.3.1
  • First release: May 11, 2018
  • Latest release: Jan 3, 2019
  • Number of updates: 9
  • Update frequency: every 26.6 days
  • Top authors: sohan5005 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,180 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.05MB] [CPU: ▼6.35ms] Passed 4 tests

This is a short check of server-side resources used by Banner Ad Creator
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0639.12 ▼11.04
Dashboard /wp-admin3.35 ▲0.0546.14 ▼3.75
Posts /wp-admin/edit.php3.40 ▲0.0547.13 ▼0.03
Add New Post /wp-admin/post-new.php5.93 ▲0.0584.64 ▼10.59
Media Library /wp-admin/upload.php3.27 ▲0.0442.26 ▲9.15
All Banners /wp-admin/edit.php?post_type=ts-banner-ad3.3236.50
Add New /wp-admin/post-new.php?post_type=ts-banner-ad3.3945.89

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Banner Ad Creator
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,880 ▲10913.25 ▼1.384.89 ▲2.6143.06 ▼2.15
Dashboard /wp-admin2,261 ▲825.82 ▼0.0599.12 ▼18.9382.03 ▲32.08
Posts /wp-admin/edit.php2,147 ▲552.02 ▲0.0137.53 ▼4.3533.50 ▼1.53
Add New Post /wp-admin/post-new.php1,559 ▲1217.53 ▼5.55738.89 ▲56.6558.40 ▲7.76
Media Library /wp-admin/upload.php1,434 ▲434.23 ▼0.0294.96 ▼3.5368.69 ▲25.41
All Banners /wp-admin/edit.php?post_type=ts-banner-ad1,1191.9632.5927.69
Add New /wp-admin/post-new.php?post_type=ts-banner-ad3,0337.22152.55158.61

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please take a closer look at the following
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/banner-creator/banner-ad-creator.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/banner-creator/includes/auto-ad-display.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/banner-creator/includes/view.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/banner-creator/includes/post-types.php:9

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
6 plugin tags: banner creator, banner designer, banner maker, advertisement, ads...

banner-creator/banner-ad-creator.php 85% from 13 tests

The main PHP file in "Banner Ad Creator" ver. 1.1 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("banner-creator.php" instead of "banner-ad-creator.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,755 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP4158111,200
PO File1112117253
JavaScript2310152
CSS1296133
SVG10117

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity35.75
▷ Minimum class complexity8.00
▷ Maximum class complexity70.00
Average method complexity4.66
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods38
▷ Static methods12.63%
▷ Public methods38100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
31 PNG files occupy 0.25MB with 0.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/ad-sizes/hpa.png6.33KB1.06KB▼ 83.28%
assets/images/ad-sizes/mrc.png6.23KB1.04KB▼ 83.23%
assets/images/ad-sizes/ttc.png6.01KB1.01KB▼ 83.19%
assets/images/ad-sizes/gpc.png5.99KB1.01KB▼ 83.13%
assets/images/ad-sizes/fbc.png19.79KB1.01KB▼ 94.91%