84% banner-upload

Code Review | Banner Upload

WordPress plugin Banner Upload scored84%from 54 tests.

About plugin

  • Plugin page: banner-upload
  • Plugin version: 1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.7.3
  • WordPress version: 6.3.1
  • First release: Jan 15, 2014
  • Latest release: Mar 14, 2017
  • Number of updates: 43
  • Update frequency: every 27.2 days
  • Top authors: vinoth06 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

900+ active /32,943 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.03MB] [CPU: ▼5.19ms] Passed 4 tests

A check of server-side resources used by Banner Upload
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0342.38 ▼5.92
Dashboard /wp-admin3.34 ▲0.0457.22 ▲2.63
Posts /wp-admin/edit.php3.39 ▲0.0347.77 ▼5.46
Add New Post /wp-admin/post-new.php5.92 ▲0.0398.99 ▼9.26
Media Library /wp-admin/upload.php3.26 ▲0.0339.04 ▼0.11

Server storage [IO: ▲0.01MB] [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: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_buffercode_banner_upload_info
theysaidso_admin_options
db_upgraded
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for Banner Upload
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.69 ▲0.332.00 ▲0.2544.94 ▲1.46
Dashboard /wp-admin2,198 ▲215.59 ▼0.0785.47 ▼6.8639.42 ▼0.95
Posts /wp-admin/edit.php2,100 ▼31.98 ▼0.0333.44 ▼1.1734.42 ▼2.69
Add New Post /wp-admin/post-new.php1,526 ▼222.99 ▼0.22583.83 ▼94.4455.33 ▲5.74
Media Library /wp-admin/upload.php1,394 ▼64.27 ▲0.0398.59 ▼19.7246.05 ▼10.42

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 7 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_buffercode_banner_upload_info
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Please fix the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/banner-upload/banner-upload.php:14

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 11 tag instead of maximum 10
The official readme.txt might help

banner-upload/banner-upload.php Passed 13 tests

"Banner Upload" version 1.6's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
90 characters long description:
Easy way to display the different size of banner advertisements in WordPress using widgets

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin126 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP12810114
JavaScript10012

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity22.00
▷ Minimum class complexity22.00
▷ Maximum class complexity22.00
Average method complexity6.25
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
There are no PNG files in this plugin