83% alb-block-theme-type-1-banner

Code Review | ALB Block Theme Type 1 Banner

WordPress plugin ALB Block Theme Type 1 Banner scored83%from 54 tests.

About plugin

  • Plugin page: alb-block-theme-t...
  • Plugin version: 1.0.2
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 6.0-6.2
  • WordPress version: 6.3.1
  • First release: Feb 18, 2023
  • Latest release: Apr 24, 2023
  • Number of updates: 17
  • Update frequency: every 4.4 days
  • Top authors: albedu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /206 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼8.11ms] Passed 4 tests

Analyzing server-side resources used by ALB Block Theme Type 1 Banner
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.92 ▼5.73
Dashboard /wp-admin3.33 ▲0.0347.55 ▼5.19
Posts /wp-admin/edit.php3.38 ▲0.0351.27 ▲3.34
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.78 ▼18.29
Media Library /wp-admin/upload.php3.25 ▲0.0336.87 ▼3.23

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 68 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by ALB Block Theme Type 1 Banner
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.23 ▼0.121.71 ▲0.0142.10 ▼1.87
Dashboard /wp-admin2,195 ▲185.60 ▼0.0783.75 ▼6.8039.69 ▼0.82
Posts /wp-admin/edit.php2,100 ▼02.13 ▲0.1040.41 ▼4.1034.28 ▼2.45
Add New Post /wp-admin/post-new.php6,376 ▲4,85022.52 ▼0.74843.36 ▲172.3853.72 ▼5.16
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.07100.72 ▼16.9144.93 ▼3.07

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Notice
      Undefined index: wideDesktopLowDPIBannerImageURL in wp-content/plugins/alb-block-theme-type-1-banner/front-end.php on line 10
    • > PHP Notice
      Undefined index: bannerImageType in wp-content/plugins/alb-block-theme-type-1-banner/front-end.php on line 6
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/alb-block-theme-type-1-banner/front-end.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/alb-block-theme-type-1-banner/front-end.php:11
    • > PHP Notice
      Undefined variable: attributes in wp-content/plugins/alb-block-theme-type-1-banner/front-end.php on line 2

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 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
2 plugin tags: 100, 102

alb-block-theme-type-1-banner/index.php 77% from 13 tests

"ALB Block Theme Type 1 Banner" version 1.0.2's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("alb-block-theme-type-1-banner.php" instead of "index.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 144 characters long)
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin4,456 lines of code in 37 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript123691063,476
PHP89114339
PO File16779239
Sass5500217
CSS576129151
JSON60034

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.33
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants00.00%
▷ Class constants5100.00%
▷ Public constants5100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin