84% sliding-banner

Code Review | Sliding Banner - News and Offers

WordPress plugin Sliding Banner - News and Offers scored84%from 54 tests.

About plugin

  • Plugin page: sliding-banner
  • Plugin version: 1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Jun 5, 2018
  • Latest release: Jun 5, 2018
  • Number of updates: 3
  • Update frequency: every 0.3 days
  • Top authors: josesd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /531 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼1.58ms] Passed 4 tests

A check of server-side resources used by Sliding Banner - News and Offers
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0538.51 ▲2.62
Dashboard /wp-admin3.34 ▲0.0350.79 ▲3.31
Posts /wp-admin/edit.php3.38 ▲0.0348.61 ▲4.99
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.32 ▼17.23
Media Library /wp-admin/upload.php3.26 ▲0.0340.02 ▲5.04
Añadir nuevo /wp-admin/post-new.php?post_type=banners3.2945.49
Banners /wp-admin/edit.php?post_type=banners3.3036.75
Sliding Banner /wp-admin/options-general.php?page=sliding-banner3.2229.69

Server storage [IO: ▲0.06MB] [DB: ▲0.07MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Sliding Banner - News and Offers
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,917 ▲17113.68 ▼1.0010.53 ▲8.6240.48 ▼4.81
Dashboard /wp-admin2,237 ▲525.83 ▼0.0398.79 ▼1.3438.80 ▼2.93
Posts /wp-admin/edit.php2,120 ▲312.05 ▲0.0139.25 ▲2.1534.23 ▼0.15
Add New Post /wp-admin/post-new.php1,559 ▲3123.25 ▲5.14677.99 ▲78.2358.22 ▲8.66
Media Library /wp-admin/upload.php1,422 ▲314.20 ▲0.01102.36 ▼0.6542.53 ▼3.01
Añadir nuevo /wp-admin/post-new.php?post_type=banners1,4902.5550.9348.88
Banners /wp-admin/edit.php?post_type=banners1,0841.9631.1229.78
Sliding Banner /wp-admin/options-general.php?page=sliding-banner8152.0623.6426.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • 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
Even though everything seems fine, this is not an exhaustive test

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 fix the following
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/sliding-banner/sliding-banner.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
6 plugin tags: notices, slider, wordpress, woocommerce, banner...

sliding-banner/sliding-banner.php 92% from 13 tests

The main PHP file in "Sliding Banner - News and Offers" ver. 1.0 adds more information about the plugin and also serves as the entry point for this plugin
Please take the time to 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

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 detected271 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP14322226
CSS10028
JavaScript10017

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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
2 PNG files occupy 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-2.png14.57KB4.22KB▼ 71.02%
assets/screenshot-1.png36.48KB12.52KB▼ 65.67%