73% wp-adrom-newsletter

Code Review | WP adRom Newsletter

WordPress plugin WP adRom Newsletter scored 73% from 54 tests.

About plugin

  • Plugin page: wp-adrom-newsletter
  • Plugin version: 1.1.35
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Nov 23, 2015
  • Latest release: May 4, 2016
  • Number of updates: 126
  • Update frequency: every 1.3 days
  • Top authors: benjamin_adrom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,204 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.24ms] Passed 4 tests

An overview of server-side resources used by WP adRom Newsletter
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0941.26 ▼3.60
Dashboard /wp-admin3.40 ▲0.0944.85 ▼3.70
Posts /wp-admin/edit.php3.45 ▲0.0944.96 ▼0.15
Add New Post /wp-admin/post-new.php6.00 ▲0.1190.09 ▼9.50
Media Library /wp-admin/upload.php3.32 ▲0.0937.05 ▲3.41
SignIn /wp-admin/admin.php?page=wp-adrom-newsletter-options-sign-in2.127.74
General /wp-admin/admin.php?page=wp-adrom-newsletter-options2.128.04
Log /wp-admin/admin.php?page=wp-adrom-newsletter-log3.3231.61
SignOut /wp-admin/admin.php?page=wp-adrom-newsletter-options-sign-out2.127.92

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 45 new files
Database: no new tables, 17 new options
New WordPress options
wp_adrom_newsletter_confirmation_error_message
can_compress_scripts
wp_adrom_newsletter_signin_error_message
theysaidso_admin_options
wp_adrom_newsletter_signout_ok_message
widget_recent-comments
wp_adrom_newsletter_signin_ok_message
wp_adrom_newsletter_signout_error_message
wp_adrom_newsletter_confirmation_error_already_confirmed_message
widget_theysaidso_widget
...

Browser metrics Passed 4 tests

WP adRom Newsletter: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,956 ▲22113.97 ▼0.469.86 ▲7.9337.44 ▼14.59
Dashboard /wp-admin2,255 ▲675.16 ▲0.1996.71 ▼5.7677.53 ▲34.94
Posts /wp-admin/edit.php2,153 ▲642.35 ▲0.3834.76 ▼6.8534.04 ▲1.76
Add New Post /wp-admin/post-new.php1,569 ▲2523.32 ▲5.11663.79 ▲76.8537.39 ▼17.89
Media Library /wp-admin/upload.php1,448 ▲574.42 ▲0.2289.68 ▼10.0482.05 ▲35.82
SignIn /wp-admin/admin.php?page=wp-adrom-newsletter-options-sign-in360.440.1010.28
General /wp-admin/admin.php?page=wp-adrom-newsletter-options360.440.0810.48
Log /wp-admin/admin.php?page=wp-adrom-newsletter-log8392.0125.0725.55
SignOut /wp-admin/admin.php?page=wp-adrom-newsletter-options-sign-out360.440.088.59

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 17 options
    • wp_adrom_newsletter_confirmation_error_message_expired_hash
    • wp_adrom_newsletter_signin_ok_message
    • theysaidso_admin_options
    • wp_adrom_newsletter_confirmation_ok_message
    • wp_adrom_newsletter_signout_ok_message
    • db_upgraded
    • wp_adrom_newsletter_plugin_version
    • wp_adrom_newsletter_signout_error_wrong_link_message
    • wp_adrom_newsletter_confirmation_error_message
    • wp_adrom_newsletter_confirmation_error_already_confirmed_message
    • ...

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-adrom-newsletter-options-sign-out
    • > User notice in wp-includes/functions.php+5905
    Function is_embed was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wp-adrom-newsletter-options-sign-out
    • > User notice in wp-includes/functions.php+5905
    Function is_search was called incorrectly. Conditional query tags do not work before the query is run. Before then, they always return false. Please see Debugging in WordPress for more information. (This message was added in version 3.1.0.)
    • > GET request to /wp-admin/admin.php?page=wp-adrom-newsletter-log
    • > Warning in wp-content/plugins/wp-adrom-newsletter/backend/options/log_page.php+13
    opendir(wp-content/uploads/wp_adrom_newsletter): failed to open dir: No such file or directory

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'adromNewsletterGlobal' not found in wp-content/plugins/wp-adrom-newsletter/backend/options/log_page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-adrom-newsletter/wp-adrom-newsletter.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'adromNewsletterGlobal' not found in wp-content/plugins/wp-adrom-newsletter/backend/options/signin_page.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'adromNewsletterGlobal' not found in wp-content/plugins/wp-adrom-newsletter/backend/options/general_page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/wp-adrom-newsletter/backend/options/signout_page.php:6

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/admin.php?page=wp-adrom-newsletter-options-sign-in
    • > Network (severe)
    wp-admin/admin.php?page=wp-adrom-newsletter-options-sign-in - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=wp-adrom-newsletter-options
    • > Network (severe)
    wp-admin/admin.php?page=wp-adrom-newsletter-options - Failed to load resource: the server responded with a status of 500 (Internal Server Error)
    • > GET request to /wp-admin/admin.php?page=wp-adrom-newsletter-options-sign-out
    • > Network (severe)
    wp-admin/admin.php?page=wp-adrom-newsletter-options-sign-out - Failed to load resource: the server responded with a status of 500 (Internal Server Error)

Optimizations

Plugin configuration Passed 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
3 plugin tags: adrom, newsletter, optout

wp-adrom-newsletter/wp-adrom-newsletter.php Passed 13 tests

The entry point to "WP adRom Newsletter" version 1.1.35 is a PHP file that has certain tags in its header comment area
60 characters long description:
Renders Signin/Signout forms via shortcodes and handles them

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin2,629 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP173781602,092
JavaScript33827208
PO File178128177
CSS62819152

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity15.69
▷ Minimum class complexity1.00
▷ Maximum class complexity66.00
Average method complexity3.85
▷ Minimum method complexity1.00
▷ Maximum method complexity28.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes13
▷ Abstract classes00.00%
▷ Concrete classes13100.00%
▷ Final classes00.00%
Methods67
▷ Static methods11.49%
▷ Public methods6698.51%
▷ Protected methods00.00%
▷ Private methods11.49%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
14 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/jquery-ui/images/ui-bg_glass_100_f6f6f6_1x400.png0.26KB0.12KB▼ 53.44%
assets/jquery-ui/images/ui-bg_gloss-wave_35_f6a828_500x100.png5.68KB1.83KB▼ 67.77%
assets/jquery-ui/images/ui-bg_highlight-soft_75_ffe45c_1x100.png0.32KB0.18KB▼ 42.38%
assets/jquery-ui/images/ui-bg_glass_65_ffffff_1x400.png0.20KB0.09KB▼ 57.49%
assets/jquery-ui/images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%