83% banana-newsletters

Code Review | Banana Newsletters

WordPress plugin Banana Newsletters scored83%from 54 tests.

About plugin

  • Plugin page: banana-newsletters
  • Plugin version: 2.0.0
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Nov 29, 2022
  • Latest release: Oct 3, 2023
  • Number of updates: 5
  • Update frequency: every 63.6 days
  • Top authors: alvarofranz (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /160 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.06MB] [CPU: ▼5.39ms] Passed 4 tests

An overview of server-side resources used by Banana Newsletters
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0642.05 ▲4.64
Dashboard /wp-admin3.36 ▲0.0648.01 ▼1.60
Posts /wp-admin/edit.php3.41 ▲0.0645.12 ▼3.67
Add New Post /wp-admin/post-new.php6.00 ▲0.1182.90 ▼17.03
Media Library /wp-admin/upload.php3.28 ▲0.0635.33 ▲0.76
All newsletters /wp-admin/edit.php?post_type=newsletter3.3337.19
Add New /wp-admin/post-new.php?post_type=subscriber3.3242.10
Newsletters /wp-admin/options-general.php?page=newsletters-settings3.2531.77
Add New /wp-admin/post-new.php?post_type=newsletter3.3242.09
All subscribers /wp-admin/edit.php?post_type=subscriber3.3335.34

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 16 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Banana Newsletters
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,878 ▲14313.41 ▼0.954.24 ▲2.4243.41 ▼0.76
Dashboard /wp-admin2,278 ▲874.84 ▼0.04114.52 ▼0.5141.90 ▲0.09
Posts /wp-admin/edit.php2,161 ▲722.05 ▲0.0940.18 ▲1.7933.41 ▲1.56
Add New Post /wp-admin/post-new.php1,575 ▲5223.22 ▲0.05691.45 ▲12.1156.11 ▼1.94
Media Library /wp-admin/upload.php1,463 ▲724.21 ▲0.0494.42 ▼10.8541.62 ▼4.94
All newsletters /wp-admin/edit.php?post_type=newsletter1,1251.9933.1630.38
Add New /wp-admin/post-new.php?post_type=subscriber1,5142.5051.3747.22
Newsletters /wp-admin/options-general.php?page=newsletters-settings9262.0523.6631.14
Add New /wp-admin/post-new.php?post_type=newsletter1,5322.5851.6448.76
All subscribers /wp-admin/edit.php?post_type=subscriber1,1251.9732.7029.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means 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 take a closer look at the following
  • 13× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function banana\ewsletters\\plugin_dir_path() in wp-content/plugins/banana-newsletters/newsletters.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function banana\ewsletters\\add_action() in wp-content/plugins/banana-newsletters/includes/enqueue-custom-admin-style.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function banana\ewsletters\\add_action() in wp-content/plugins/banana-newsletters/includes/admin-settings-page.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function banana\ewsletters\\register_activation_hook() in wp-content/plugins/banana-newsletters/includes/plugin-activation.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function banana\ewsletters\\add_shortcode() in wp-content/plugins/banana-newsletters/includes/shortcode-subscribe-form.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function banana\ewsletters\\add_action() in wp-content/plugins/banana-newsletters/includes/page-send-newsletter.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function banana\ewsletters\\add_action() in wp-content/plugins/banana-newsletters/includes/handle-subscribe-user.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function banana\ewsletters\\register_deactivation_hook() in wp-content/plugins/banana-newsletters/includes/plugin-deactivation.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function banana\ewsletters\\add_action() in wp-content/plugins/banana-newsletters/includes/cpt-newsletter.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function banana\ewsletters\\add_action() in wp-content/plugins/banana-newsletters/includes/cpt-subscriber.php:5

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

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
1 plugin tags: newsletters

banana-newsletters/newsletters.php 77% from 13 tests

The entry point to "Banana Newsletters" version 2.0.0 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("banana-newsletters.php" instead of "newsletters.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 162 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected658 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP135765620
CSS19238

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.26
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
Namespaces1
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%
Functions25
▷ Named functions25100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

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