icon-256x256
  • 84% moving-banner

    Code Review | Moving Banner

    WordPress plugin Moving Banner scored84%from 54 tests.

    About plugin

    • Plugin page: moving-banner
    • Plugin version: 1.0.0
    • PHP compatiblity: 5.2+
    • PHP version: 7.4.16
    • WordPress compatibility: 4.1-5.0.1
    • WordPress version: 6.3.1
    • First release: Jan 6, 2019
    • Latest release: Jan 6, 2019
    • Number of updates: 2
    • Update frequency: N/A
    • Top authors: traffii (100%)

    Code review

    54 tests

    User reviews

    1 review

    Install metrics

    40+ active /924 total downloads

    Benchmarks

    Plugin footprint 83% from 16 tests

    Installer Passed 1 test

    🔺 Critical test (weight: 50) | Checking the installer triggered no errors
    Install script ran successfully

    Server metrics [RAM: ▲0.07MB] [CPU: ▼1.90ms] Passed 4 tests

    Analyzing server-side resources used by Moving Banner
    This plugin has minimal impact on server resources
    PageMemory (MB)CPU Time (ms)
    Home /3.49 ▲0.0336.03 ▼8.37
    Dashboard /wp-admin3.39 ▲0.0848.17 ▲0.39
    Posts /wp-admin/edit.php3.50 ▲0.1446.41 ▼0.77
    Add New Post /wp-admin/post-new.php5.96 ▲0.08100.84 ▲7.99
    Media Library /wp-admin/upload.php3.31 ▲0.0837.71 ▲1.17

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

    How much does this plugin use your filesystem and database?
    There were no storage issued detected upon installing this plugin
    Filesystem: 12 new files
    Database: no new tables, 7 new options
    New WordPress options
    widget_theysaidso_widget
    theysaidso_admin_options
    can_compress_scripts
    db_upgraded
    mb_settings_array
    widget_recent-posts
    widget_recent-comments

    Browser metrics Passed 4 tests

    Checking browser requirements for Moving Banner
    This plugin has a minimal impact on browser resources
    PageNodesMemory (MB)Script (ms)Layout (ms)
    Home /2,841 ▲8413.16 ▼1.435.26 ▲3.0836.82 ▼12.28
    Dashboard /wp-admin2,219 ▲284.85 ▼0.02106.63 ▲5.9443.48 ▲0.35
    Posts /wp-admin/edit.php2,105 ▲132.06 ▼0.0139.37 ▼0.2934.64 ▼1.24
    Add New Post /wp-admin/post-new.php1,556 ▲2018.69 ▼4.55593.75 ▼1.1460.72 ▲3.50
    Media Library /wp-admin/upload.php1,407 ▲194.23 ▲0.06100.75 ▼0.2943.11 ▼1.23

    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
    It is recommended to fix the following
    • This plugin does not fully uninstall, leaving 6 options in the database
      • widget_recent-comments
      • widget_recent-posts
      • theysaidso_admin_options
      • db_upgraded
      • can_compress_scripts
      • widget_theysaidso_widget

    Smoke tests 75% from 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 50% from 2 tests

    🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
    The following issues need your attention
    • 1× PHP files perform the task of outputting text when accessed with GET requests:
      • > /wp-content/plugins/moving-banner/moving-banner.php

    User-side errors Passed 1 test

    🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
    Everything seems fine, but this is not an exhaustive test

    Optimizations

    Plugin configuration 97% from 29 tests

    readme.txt 94% from 16 tests

    Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
    Please fix the following attributes:
    • Screenshots: Please add an image for screenshot #1 (Live example)
    The official readme.txt might help

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

    The main PHP file in "Moving Banner" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
    130 characters long description:
    Show your users beautifully animated banner on the site. Set your own animation speed and direction, banner height and time frame.

    Code Analysis Passed 3 tests

    File types Passed 1 test

    🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
    Good job! No executable or dangerous file extensions detected705 lines of code in 9 files:
    LanguageFilesBlank linesComment linesLines of code
    PHP48316481
    PO File24646149
    JavaScript261374
    CSS1001

    PHP code Passed 2 tests

    An overview of cyclomatic complexity and code structure
    Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
    Cyclomatic complexity
    Average complexity per logical line of code0.35
    Average class complexity15.67
    ▷ Minimum class complexity1.00
    ▷ Maximum class complexity36.00
    Average method complexity2.22
    ▷ Minimum method complexity1.00
    ▷ Maximum method complexity14.00
    Code structure
    Namespaces0
    Interfaces0
    Traits0
    Classes3
    ▷ Abstract classes00.00%
    ▷ Concrete classes3100.00%
    ▷ Final classes00.00%
    Methods36
    ▷ Static methods513.89%
    ▷ Public methods2775.00%
    ▷ Protected methods00.00%
    ▷ Private methods925.00%
    Functions0
    ▷ Named functions00.00%
    ▷ Anonymous functions00.00%
    Constants3
    ▷ Global constants3100.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
    There were not PNG files found in your plugin