78% blog-newsletter

Code Review | BlogNewsletter

WordPress plugin BlogNewsletter scored 78% from 54 tests.

About plugin

  • Plugin page: blog-newsletter
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.2.4
  • WordPress version: 6.3.1
  • First release: Mar 22, 2014
  • Latest release: Aug 8, 2015
  • Number of updates: 9
  • Update frequency: every 56.0 days
  • Top authors: veganist (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 940 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.35ms] Passed 4 tests

An overview of server-side resources used by BlogNewsletter
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0033.63 ▼3.96
Dashboard /wp-admin3.32 ▲0.0245.11 ▼4.16
Posts /wp-admin/edit.php3.37 ▲0.0247.44 ▲1.67
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.73 ▼16.16
Media Library /wp-admin/upload.php3.24 ▲0.0234.65 ▼1.11
Blog Newsletter /wp-admin/options-general.php?page=blog-newsletter-admin3.1927.19

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for BlogNewsletter
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3314.48 ▲0.261.76 ▼0.1042.22 ▲2.43
Dashboard /wp-admin2,210 ▲185.90 ▲0.93104.38 ▼1.5737.11 ▼5.22
Posts /wp-admin/edit.php2,093 ▲11.99 ▲0.0033.45 ▼0.7333.41 ▼2.80
Add New Post /wp-admin/post-new.php1,536 ▲323.10 ▼0.12656.23 ▲4.8557.72 ▲2.18
Media Library /wp-admin/upload.php1,395 ▲74.22 ▼0.02100.77 ▼11.9643.13 ▼2.78
Blog Newsletter /wp-admin/options-general.php?page=blog-newsletter-admin8242.0522.3431.16

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=blog-newsletter-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
    • > GET request to /wp-admin/options-general.php?page=blog-newsletter-admin
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 5 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=blog-newsletter-admin
    • > Notice in wp-content/plugins/blog-newsletter/blognewsletter.php+273
    Trying to access array offset on value of type bool

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
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/blog-newsletter/blognewsletter.php:88

User-side errors Passed 1 test

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

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
2 plugin tags: newsletter, email

blog-newsletter/blognewsletter.php 92% from 13 tests

The primary PHP file in "BlogNewsletter" version 1.1 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("blog-newsletter.php" instead of "blognewsletter.php")

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
Everything looks great! No dangerous files found in this plugin195 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP13260195

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.64
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods11
▷ Static methods00.00%
▷ Public methods11100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.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
No PNG files were detected