84% inboxads-monetize-your-emails-and-newsletters-in-minutes

Code Review | inboxAds - Monetize Your Emails and Newsletters in Minutes

WordPress plugin inboxAds - Monetize Your Emails and Newsletters in Minutes scored84%from 54 tests.

About plugin

  • Plugin page: inboxads-monetize...
  • Plugin version: 1.0.19
  • PHP compatiblity: 7.1+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.3
  • WordPress version: 6.3.1
  • First release: Aug 13, 2019
  • Latest release: Mar 10, 2020
  • Number of updates: 37
  • Update frequency: every 5.7 days
  • Top authors: inboxads (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,301 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.40MB] [CPU: ▼5.26ms] Passed 4 tests

This is a short check of server-side resources used by inboxAds - Monetize Your Emails and Newsletters in Minutes
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4249.19 ▲5.03
Dashboard /wp-admin3.80 ▲0.4156.10 ▼14.06
Posts /wp-admin/edit.php3.85 ▲0.4553.58 ▼0.17
Add New Post /wp-admin/post-new.php6.32 ▲0.3995.22 ▼8.33
Media Library /wp-admin/upload.php3.66 ▲0.3941.75 ▲1.51

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

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

Browser metrics Passed 4 tests

inboxAds - Monetize Your Emails and Newsletters in Minutes: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,898 ▲12714.18 ▼0.171.71 ▼0.3142.74 ▼1.41
Dashboard /wp-admin2,301 ▲1245.57 ▼0.0086.48 ▼10.9940.15 ▼2.43
Posts /wp-admin/edit.php2,210 ▲1102.00 ▼0.0035.79 ▼6.1333.73 ▼2.93
Add New Post /wp-admin/post-new.php1,539 ▲1123.54 ▲0.31685.54 ▲12.5353.67 ▼2.05
Media Library /wp-admin/upload.php1,510 ▲1134.24 ▲0.06103.84 ▲2.0345.42 ▲3.10

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • wpr_inboxads_do_activation_redirect
    • wpr_inboxads_newsletter_domain
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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 items
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant WPR_ADS_URI - assumed 'WPR_ADS_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/inboxads-monetize-your-emails-and-newsletters-in-minutes/plugins/newsletter/blocks/ads/options.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPR\\inboxads_formats() in wp-content/plugins/inboxads-monetize-your-emails-and-newsletters-in-minutes/plugins/newsletter/blocks/ads/block.php:13
    • > PHP Warning
      Use of undefined constant WPR_ADS_URI - assumed 'WPR_ADS_URI' (this will throw an Error in a future version of PHP) in wp-content/plugins/inboxads-monetize-your-emails-and-newsletters-in-minutes/plugins/newsletter/blocks/ads/options.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function WPR\\esc_html_e() in wp-content/plugins/inboxads-monetize-your-emails-and-newsletters-in-minutes/plugins/newsletter/blocks/ads/options.php:16

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)
Everything seems fine on the user side

Optimizations

Plugin configuration 96% 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
8 plugin tags: revenue, mailster, alo easymail, newsletter, ads...

inboxads-monetize-your-emails-and-newsletters-in-minutes/inboxads.php 92% from 13 tests

The primary PHP file in "inboxAds - Monetize Your Emails and Newsletters in Minutes" version 1.0.19 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("inboxads-monetize-your-emails-and-newsletters-in-minutes.php" instead of "inboxads.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
Success! There were no dangerous files found in this plugin7,241 lines of code in 45 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript9185922,241
PHP134776582,067
CSS491171,935
Sass614714833
SVG1300165

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity24.89
▷ Minimum class complexity1.00
▷ Maximum class complexity107.00
Average method complexity3.28
▷ Minimum method complexity1.00
▷ Maximum method complexity15.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes00.00%
Methods67
▷ Static methods57.46%
▷ Public methods67100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions872.73%
▷ Anonymous functions327.27%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
8 PNG files occupy 0.12MB with 0.09MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
plugins/newsletter/blocks/ads/icon.png5.16KB1.54KB▼ 70.07%
plugins/shortcode-builder/icon.png1.40KB0.85KB▼ 39.26%
assets/images/newsletter.png27.37KB5.44KB▼ 80.12%
assets/images/mailster.png19.11KB2.61KB▼ 86.35%
assets/images/alo-easymail.png17.09KB1.47KB▼ 91.42%