78% budgetmailer-sign-up-form

Code Review | BudgetMailer Sign Up Form

WordPress plugin BudgetMailer Sign Up Form scored78%from 54 tests.

About plugin

  • Plugin page: budgetmailer-sign...
  • Plugin version: 1.0.5
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.0-4.7
  • WordPress version: 6.3.1
  • First release: Oct 21, 2015
  • Latest release: Feb 19, 2017
  • Number of updates: 20
  • Update frequency: every 24.3 days
  • Top authors: BudgetMailer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,572 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.58MB] [CPU: ▼0.44ms] Passed 4 tests

Server-side resources used by BudgetMailer Sign Up Form
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /4.04 ▲0.5840.58 ▼3.59
Dashboard /wp-admin3.88 ▲0.5847.78 ▲1.34
Posts /wp-admin/edit.php3.93 ▲0.5851.62 ▼0.04
Add New Post /wp-admin/post-new.php6.48 ▲0.5996.92 ▲7.28
Media Library /wp-admin/upload.php3.80 ▲0.5838.00 ▲0.55
BudgetMailer Sign Up /wp-admin/options-general.php?page=budgetmailer3.7937.92

Server storage [IO: ▲0.40MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Just a few items left to fix
  • The plugin illegally modified 1 file (0.01KB) outside of "wp-content/plugins/budgetmailer-sign-up-form/" and "wp-content/uploads/"
    • (new file) wp-content/budgetmailer/.htaccess
Filesystem: 46 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

Checking browser requirements for BudgetMailer Sign Up Form
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲15613.96 ▼0.318.05 ▲5.6839.63 ▼4.47
Dashboard /wp-admin2,208 ▲205.83 ▲0.91106.28 ▲4.6143.00 ▲3.95
Posts /wp-admin/edit.php2,098 ▲92.08 ▲0.0839.80 ▼1.2534.36 ▼4.30
Add New Post /wp-admin/post-new.php1,528 ▼518.23 ▼4.62601.16 ▼96.3136.18 ▼25.82
Media Library /wp-admin/upload.php1,390 ▼14.16 ▼0.0298.80 ▼2.8640.97 ▼3.54
BudgetMailer Sign Up /wp-admin/options-general.php?page=budgetmailer9311.8024.0625.65

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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 fix the following
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/budgetmailer-sign-up-form/view/captcha.php
    • > /wp-content/plugins/budgetmailer-sign-up-form/view/head.php
    • > /wp-content/plugins/budgetmailer-sign-up-form/view/messages.php
  • 10× PHP files trigger server errors when accessed directly:
    • > PHP Notice
      Undefined variable: url in wp-content/plugins/budgetmailer-sign-up-form/view/head.php on line 4
    • > PHP Notice
      Undefined variable: captcha in wp-content/plugins/budgetmailer-sign-up-form/view/captcha.php on line 5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function BudgetMailer\\Wordpress\\get_option() in wp-content/plugins/budgetmailer-sign-up-form/src/BudgetMailer/Wordpress/Settings.php:280
    • > PHP Notice
      Undefined variable: label in wp-content/plugins/budgetmailer-sign-up-form/view/captcha.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/budgetmailer-sign-up-form/src/BudgetMailer/Wordpress/Widget/Subscribe.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'BudgetMailer\\Wordpress\\L10n' not found in wp-content/plugins/budgetmailer-sign-up-form/view/options.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'BudgetMailer\\Wordpress\\L10n' not found in wp-content/plugins/budgetmailer-sign-up-form/view/subscribe.php:15
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/budgetmailer-sign-up-form/view/subscribe.php on line 8
    • > PHP Fatal error
      Uncaught Error: Class 'BudgetMailer\\Wordpress\\L10n' not found in wp-content/plugins/budgetmailer-sign-up-form/view/checkbox.php:5
    • > PHP Notice
      Undefined variable: settings in wp-content/plugins/budgetmailer-sign-up-form/view/subscribe.php on line 8

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: email marketing, newsletter sign up, sign up, subscribe widget, budgetmailer...

budgetmailer-sign-up-form/budgetmailer-sign-up-form.php Passed 13 tests

"BudgetMailer Sign Up Form" version 1.0.5's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
125 characters long description:
Easily add BudgetMailer newsletter sign up forms to your WordPress website with the offical BudgetMailer Sign Up Form plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Everything looks great! No dangerous files found in this plugin3,897 lines of code in 32 files:
LanguageFilesBlank linesComment linesLines of code
PHP257321,6063,136
PO File2208260448
JavaScript24212145
Markdown1350116
CSS28052

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity18.44
▷ Minimum class complexity1.00
▷ Maximum class complexity53.00
Average method complexity2.53
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes18
▷ Abstract classes00.00%
▷ Concrete classes18100.00%
▷ Final classes00.00%
Methods200
▷ Static methods94.50%
▷ Public methods14371.50%
▷ Protected methods5427.00%
▷ Private methods31.50%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants74
▷ Global constants11.35%
▷ Class constants7398.65%
▷ Public constants73100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.16MB with 0.05MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/loading.png0.79KB0.71KB▼ 11.07%
assets/screenshot-2.png55.75KB32.80KB▼ 41.17%
assets/hourglass.png0.70KB0.66KB▼ 6.80%
assets/screenshot-3.png77.39KB40.14KB▼ 48.13%
assets/screenshot-1.png30.04KB12.32KB▼ 58.98%