84% featured-content-block

Code Review | Featured Content Block

WordPress plugin Featured Content Block scored84%from 54 tests.

About plugin

  • Plugin page: featured-content-...
  • Plugin version: 1.0.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.9-6.1
  • WordPress version: 6.3.1
  • First release: Nov 16, 2022
  • Latest release: Nov 16, 2022
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: ArenaPigskin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /289 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼5.80ms] Passed 4 tests

A check of server-side resources used by Featured Content Block
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0439.54 ▼4.33
Dashboard /wp-admin3.33 ▲0.0245.39 ▼1.48
Posts /wp-admin/edit.php3.38 ▲0.0247.32 ▼5.10
Add New Post /wp-admin/post-new.php5.91 ▲0.0384.42 ▼12.30
Media Library /wp-admin/upload.php3.25 ▲0.0234.06 ▲1.04

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Featured Content Block
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,803 ▲5713.32 ▼1.051.79 ▲0.1244.52 ▼0.14
Dashboard /wp-admin2,206 ▲154.87 ▼0.97106.93 ▲2.5638.69 ▼5.34
Posts /wp-admin/edit.php2,089 ▼02.05 ▲0.0540.50 ▲4.3035.19 ▼2.09
Add New Post /wp-admin/post-new.php6,253 ▲4,73919.99 ▲2.51909.23 ▲312.8036.39 ▼15.01
Media Library /wp-admin/upload.php1,388 ▲34.24 ▲0.0095.82 ▼2.4540.93 ▲0.44

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options

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
  • 12× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_block_pattern() in wp-content/plugins/featured-content-block/patterns/featured-content-column-reverse-pattern.php:12
    • > PHP Notice
      Trying to get property 'attributes' of non-object in wp-content/plugins/featured-content-block/build/template.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/featured-content-block/patterns/patterns.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/featured-content-block/featured-content-block.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Query' not found in wp-content/plugins/featured-content-block/build/template.php:17
    • > PHP Notice
      Undefined variable: block in wp-content/plugins/featured-content-block/build/template.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_block_pattern() in wp-content/plugins/featured-content-block/patterns/featured-content-column-pattern.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_block_pattern() in wp-content/plugins/featured-content-block/patterns/featured-content-block-reverse-row-photo-left.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_block_pattern() in wp-content/plugins/featured-content-block/patterns/featured-content-block-row-photo-left.php:12
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/featured-content-block/build/template.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: block

featured-content-block/featured-content-block.php 92% from 13 tests

The main file in "Featured Content Block" v. 1.0.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Requires at least: Required version does not match the one declared in readme.txt ("6.0" instead of "5.9")

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
Good job! No executable or dangerous file extensions detected753 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PO File690126420
PHP1041106235
JSON10046
Markdown312043
JavaScript2007
CSS2002

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.18
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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