84% widget-specific-posts

Code Review | Widget Specific Posts

WordPress plugin Widget Specific Posts scored84%from 54 tests.

About plugin

  • Plugin page: widget-specific-p...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-5.1.1
  • WordPress version: 6.3.1
  • First release: Apr 17, 2019
  • Latest release: Apr 26, 2019
  • Number of updates: 10
  • Update frequency: every 0.9 days
  • Top authors: carlosramosweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /496 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.63ms] Passed 4 tests

An overview of server-side resources used by Widget Specific Posts
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0146.53 ▲1.02
Dashboard /wp-admin3.32 ▲0.0147.98 ▼3.91
Posts /wp-admin/edit.php3.37 ▲0.0148.02 ▼0.60
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.50 ▼8.53
Media Library /wp-admin/upload.php3.24 ▲0.0135.19 ▼1.49

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options

Browser metrics Passed 4 tests

Checking browser requirements for Widget Specific Posts
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.75 ▲0.371.82 ▼0.5042.15 ▼1.98
Dashboard /wp-admin2,195 ▲185.58 ▼0.0685.78 ▼18.7737.89 ▼9.78
Posts /wp-admin/edit.php2,100 ▼02.04 ▼0.0140.10 ▲2.2338.12 ▲2.03
Add New Post /wp-admin/post-new.php1,526 ▼2317.76 ▼5.13626.18 ▼37.3151.94 ▼8.85
Media Library /wp-admin/upload.php1,397 ▼34.37 ▲0.13116.61 ▲9.8147.99 ▼2.83

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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 7 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_wp_widget_specific_posts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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 take a closer look at the following
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/widget-specific-posts/widget-specific-post.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: specific, posts, number, single, widget

widget-specific-posts/widget-specific-post.php 92% from 13 tests

The primary PHP file in "Widget Specific Posts" version 1.0.0 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("widget-specific-posts.php" instead of "widget-specific-post.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin70 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity2.75
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions1100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
PNG images were not found in this plugin