79% banner-system

Code Review | Banner System

WordPress plugin Banner System scored79%from 54 tests.

About plugin

  • Plugin page: banner-system
  • Plugin version: 1.0.0
  • PHP compatiblity: 5.6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.8.2-4.8.2
  • WordPress version: 6.3.1
  • First release: Oct 21, 2017
  • Latest release: Dec 10, 2017
  • Number of updates: 3
  • Update frequency: every 16.7 days
  • Top authors: saulmorales (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,870 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▼1.72MB] [CPU: ▼45.43ms] Passed 4 tests

An overview of server-side resources used by Banner System
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.27 ▼1.198.22 ▼26.10
Dashboard /wp-admin2.28 ▼1.0211.11 ▼36.12
Posts /wp-admin/edit.php2.28 ▼1.0711.49 ▼35.92
Add New Post /wp-admin/post-new.php2.28 ▼3.6010.86 ▼83.58
Media Library /wp-admin/upload.php2.28 ▼0.9410.76 ▼21.80

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 32 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Banner System
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲20713.72 ▼0.595.90 ▲4.1940.90 ▼5.35
Dashboard /wp-admin2,248 ▲605.11 ▲0.00104.41 ▼6.2377.34 ▲32.16
Posts /wp-admin/edit.php2,134 ▲422.04 ▲0.0238.57 ▼0.7933.42 ▼3.08
Add New Post /wp-admin/post-new.php1,564 ▲2218.77 ▲0.47670.10 ▲22.1468.81 ▲12.15
Media Library /wp-admin/upload.php1,433 ▲424.12 ▼0.05114.59 ▲11.9745.16 ▼2.70
Configuración /wp-admin/admin.php?page=config-Banner System8482.0424.6934.26
Membresia /wp-admin/admin.php?page=configmember-Banner System8252.0925.8832.69
Ayuda /wp-admin/admin.php?page=confighelp-Banner System9232.0323.3531.90
Banners /wp-admin/admin.php?page=configbanners-Banner System9362.0524.8634.25
Flow /wp-admin/admin.php?page=configflow-Banner System1,1012.1226.4826.06

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 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
  • Uninstall procedure had uncaught errors
    • > User deprecated in wp-includes/functions.php+5453
    Function get_page_by_title is deprecated since version 6.2.0! Use WP_Query instead.
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests Passed 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 Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 86% 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: There are too many tags (11 tag instead of maximum 10)
You can take inspiration from this readme.txt

banner-system/bannersystem.php 77% from 13 tests

This is the main PHP file of "Banner System" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
The following require your attention:
  • Domain Path: The domain path points to a folder that does not exist ("/languages/")
  • Main file name: The principal plugin file should be the same as the plugin slug ("banner-system.php" instead of "bannersystem.php")
  • 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

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin2,342 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP122632221,809
JavaScript2310511
CSS11022

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity30.82
▷ Minimum class complexity1.00
▷ Maximum class complexity99.00
Average method complexity5.90
▷ Minimum method complexity1.00
▷ Maximum method complexity53.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes11
▷ Abstract classes00.00%
▷ Concrete classes11100.00%
▷ Final classes00.00%
Methods67
▷ Static methods00.00%
▷ Public methods5886.57%
▷ Protected methods22.99%
▷ Private methods710.45%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
7 PNG files occupy 0.32MB with 0.13MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/screenshot-1.png10.44KB5.26KB▼ 49.59%
icon.png1.72KB1.61KB▼ 6.25%
assets/img/movil_banner_bannersystem.png7.40KB3.67KB▼ 50.38%
assets/img/screenshot-3.png35.20KB14.72KB▼ 58.19%
assets/img/leaderboard_bannersystem.png3.01KB1.56KB▼ 48.17%