94% bannerly

Code Review | Bannerly

WordPress plugin Bannerly scored 94% from 54 tests.

About plugin

  • Plugin page: bannerly
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-5.6.1
  • WordPress version: 5.8.1
  • First release: Feb 17, 2021
  • Latest release: Feb 17, 2021
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: jsheffers (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 111 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Bannerly
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.90 ▲0.0636.05 ▲6.53
Dashboard /wp-admin3.11 ▲0.0545.65 ▲2.62
Posts /wp-admin/edit.php3.23 ▲0.1145.65 ▲2.69
Add New Post /wp-admin/post-new.php5.47 ▲0.0387.90 ▼687.28
Media Library /wp-admin/upload.php3.06 ▲0.0533.21 ▲1.83
Bannerly /wp-admin/options-general.php?page=bannerly3.0327.80

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 22 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Bannerly
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,833 ▲23718.13 ▲2.4856.08 ▲44.2243.97 ▼6.25
Dashboard /wp-admin3,001 ▲676.20 ▲0.16134.33 ▼2.32104.88 ▼8.51
Posts /wp-admin/edit.php2,748 ▲92.72 ▲0.0165.78 ▲3.6487.60 ▼0.47
Add New Post /wp-admin/post-new.php1,505 ▲718.84 ▲0.07360.72 ▼33.12112.17 ▼0.64
Media Library /wp-admin/upload.php1,813 ▲65.04 ▲0.01145.95 ▲4.49114.54 ▼2.31
Bannerly /wp-admin/options-general.php?page=bannerly1,0972.3458.4981.64

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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 items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/bannerly/admin/partials/bannerly-admin-display.php:21
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/bannerly/public/partials/bannerly-public-display.php:15

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 Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
6 plugin tags: bar, announce, annoucnement, banners, coupon...

bannerly/bannerly.php Passed 13 tests

Analyzing the main PHP file in "Bannerly" version 1.0.0
78 characters long description:
Load simple, beautiful customizable banners directly into your Wordpress site.

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
There were no executable files found in this plugin259 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP1298535253
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.07
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.11
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
There are no PNG files in this plugin