• 84% super-recent-posts-widget

    Code Review | Super Recent Posts Widget

    WordPress plugin Super Recent Posts Widget scored 84% from 54 tests.

    About plugin

    • Plugin page: super-recent-post...
    • Plugin version: 0.3.0
    • PHP version: 7.4.16
    • WordPress compatibility: 3.6-5.3.2
    • WordPress version: 5.8.1
    • First release: Jan 23, 2014
    • Latest release: Jan 21, 2020
    • Number of updates: 44
    • Update frequency: every 49.8 days
    • Top authors: matstars (100%)

    Code review

    54 tests

    User reviews

    2 reviews

    Install metrics

    100+ active / 3,905 total downloads


    Plugin footprint 83% from 16 tests

    Installer Passed 1 test

    🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
    The plugin installed successfully, without throwing any errors or notices

    Server metrics [RAM: ▲0.06MB] [CPU: ▼144.22ms] Passed 4 tests

    Analyzing server-side resources used by Super Recent Posts Widget
    This plugin has minimal impact on server resources
    PageMemory (MB)CPU Time (ms)
    Home /2.90 ▲0.1836.74 ▲15.04
    Dashboard /wp-admin3.12 ▲0.0643.49 ▼0.83
    Posts /wp-admin/edit.php3.17 ▲0.0546.79 ▼8.46
    Add New Post /wp-admin/post-new.php5.48 ▲0.0489.60 ▼563.88
    Media Library /wp-admin/upload.php3.06 ▲0.0629.93 ▼3.69

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

    Filesystem and database footprint
    The plugin installed successfully
    Filesystem: 15 new files
    Database: no new tables, 1 new option
    New WordPress options

    Browser metrics Passed 4 tests

    Super Recent Posts Widget: an overview of browser usage
    Normal browser usage
    PageNodesMemory (MB)Script (ms)Layout (ms)
    Home /3,679 ▲4216.14 ▲0.4411.18 ▲0.8549.26 ▼1.69
    Dashboard /wp-admin2,973 ▲396.08 ▲0.12141.91 ▼10.42109.18 ▲4.06
    Posts /wp-admin/edit.php2,739 ▼02.72 ▼0.0070.53 ▲5.1195.26 ▲6.14
    Add New Post /wp-admin/post-new.php1,615 ▼6821.98 ▲3.20398.94 ▲11.67101.90 ▼5.47
    Media Library /wp-admin/upload.php1,807 ▼35.02 ▼0.00152.95 ▼41.21112.95 ▼0.02

    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
    You still need to fix the following
    • The uninstall procedure has failed, leaving 1 option in the database
      • widget_super_recent_posts_widget

    Smoke tests 75% from 4 tests

    Server-side errors Passed 1 test

    🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
    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
    Please fix the following
    • 6× PHP files trigger server errors when accessed directly:
      • > PHP Fatal error
        Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/super-recent-posts-widget/lib/class-super-recent-posts-widget.php:3
      • > PHP Fatal error
        Uncaught Error: Call to undefined function add_action() in wp-content/plugins/super-recent-posts-widget/lib/class-srpw-ajax.php:6
      • > PHP Notice
        Undefined variable: title in wp-content/plugins/super-recent-posts-widget/views/widget.php on line 2
      • > PHP Notice
        Undefined variable: posts in wp-content/plugins/super-recent-posts-widget/views/widget.php on line 7
      • > PHP Fatal error
        Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/super-recent-posts-widget/lib/class-super-recent-posts-widget.php:3
      • > PHP Fatal error
        Uncaught Error: Call to a member function have_posts() on null in wp-content/plugins/super-recent-posts-widget/views/widget.php:7

    User-side errors Passed 1 test

    🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
    No browser errors were detected


    Plugin configuration 97% from 29 tests

    readme.txt 94% from 16 tests

    It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
    These attributes need to be fixed:
    • Screenshots: Screenshot #1 (Screenshot of widget) image required
    You can look at the official readme.txt

    super-recent-posts-widget/super-recent-posts-widget.php Passed 13 tests

    The main PHP file in "Super Recent Posts Widget" ver. 0.3.0 adds more information about the plugin and also serves as the entry point for this plugin
    129 characters long description:
    A prettier, filterable and more functional recent posts widget that allows you to choose a custom post type or specific taxonomy.

    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
    Success! There were no dangerous files found in this plugin571 lines of code in 13 files:
    LanguageFilesBlank linesComment linesLines of code

    PHP code Passed 2 tests

    This is a very shot review of cyclomatic complexity and code structure
    All good! No complexity issues found
    Cyclomatic complexity
    Average complexity per logical line of code0.19
    Average class complexity9.67
    ▷ Minimum class complexity3.00
    ▷ Maximum class complexity17.00
    Average method complexity3.00
    ▷ Minimum method complexity1.00
    ▷ Maximum method complexity8.00
    Code structure
    ▷ Abstract classes00.00%
    ▷ Concrete classes3100.00%
    ▷ Final classes00.00%
    ▷ Static methods964.29%
    ▷ Public methods14100.00%
    ▷ Protected methods00.00%
    ▷ Private methods00.00%
    ▷ Named functions00.00%
    ▷ Anonymous functions1100.00%
    ▷ Global constants00.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
    No PNG images were found in this plugin