72% revenueflex-easy-ads

Code Review | Auto Ad Inserter - Increase Google Adsense and Ad Manager Revenue

WordPress plugin Auto Ad Inserter - Increase Google Adsense and Ad Manager Revenue scored72%from 54 tests.

About plugin

  • Plugin page: revenueflex-easy-ads
  • Plugin version: 1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.2.2
  • WordPress version: 6.3.1
  • First release: May 6, 2022
  • Latest release: Jul 13, 2023
  • Number of updates: 23
  • Update frequency: every 19.7 days
  • Top authors: revenueflex (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /1,430 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.03MB] [CPU: ▼20.09ms] Passed 4 tests

A check of server-side resources used by Auto Ad Inserter - Increase Google Adsense and Ad Manager Revenue
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1741.82 ▲1.51
Dashboard /wp-admin3.33 ▼0.0229.56 ▼33.41
Posts /wp-admin/edit.php3.40 ▲0.0431.88 ▼15.28
Add New Post /wp-admin/post-new.php5.64 ▼0.2565.52 ▼27.01
Media Library /wp-admin/upload.php3.35 ▲0.1227.63 ▼4.66
Project Create / Select /wp-admin/admin.php?page=revenueflex-projectSelectCreatePage3.3127.09
Update Email Validate Key /wp-admin/admin.php?page=revenueflex-updateEmailValidateKeyPage3.3128.07
Update Email /wp-admin/admin.php?page=revenueflex-updateEmailPage3.3128.75
Update User Settings /wp-admin/admin.php?page=revenueflex-updateUserSettingsPage3.3124.31
Validate Key /wp-admin/admin.php?page=revenueflex-validateKeyPage3.3128.39
Delete Account /wp-admin/admin.php?page=revenueflex-deleteAccountPage3.3125.35
User Settings /wp-admin/admin.php?page=revenueflex-userSettingsPage3.3124.40
Project Settings /wp-admin/admin.php?page=revenueflex-projectSettingsPage3.3124.95
Dashboard /wp-admin/admin.php?page=revenueflex-dashboardPage3.3134.81
Auto Ad Inserter /wp-admin/admin.php?page=startPage3.2425.82

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 91 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
revenueflex_api
theysaidso_admin_options
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Auto Ad Inserter - Increase Google Adsense and Ad Manager Revenue
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲15913.31 ▼1.091.80 ▼0.0343.80 ▼4.89
Dashboard /wp-admin2,300 ▲1155.88 ▲0.02101.19 ▼1.6738.82 ▼5.38
Posts /wp-admin/edit.php2,182 ▲902.06 ▲0.0039.18 ▲0.3133.41 ▼1.85
Add New Post /wp-admin/post-new.php1,570 ▲5123.07 ▼0.27600.91 ▼98.5450.20 ▼1.74
Media Library /wp-admin/upload.php1,484 ▲1024.27 ▲0.1195.44 ▼3.5441.75 ▼1.69
Project Create / Select /wp-admin/admin.php?page=revenueflex-projectSelectCreatePage9412.2137.2043.62
Update Email Validate Key /wp-admin/admin.php?page=revenueflex-updateEmailValidateKeyPage9522.0933.8924.57
Update Email /wp-admin/admin.php?page=revenueflex-updateEmailPage9502.0931.7822.30
Update User Settings /wp-admin/admin.php?page=revenueflex-updateUserSettingsPage1,1222.0232.3122.16
Validate Key /wp-admin/admin.php?page=revenueflex-validateKeyPage1,7893.6063.0029.81
Delete Account /wp-admin/admin.php?page=revenueflex-deleteAccountPage9482.0936.4823.99
User Settings /wp-admin/admin.php?page=revenueflex-userSettingsPage9372.0229.6523.89
Project Settings /wp-admin/admin.php?page=revenueflex-projectSettingsPage2,6712.3138.1071.88
Dashboard /wp-admin/admin.php?page=revenueflex-dashboardPage9332.1534.3820.58
Auto Ad Inserter /wp-admin/admin.php?page=startPage9142.0029.4620.77

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
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • revenueflex_api

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
  • 67 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=startPage
    • > Notice in wp-content/plugins/revenueflex-easy-ads/inc.php+91
    Trying to access array offset on value of type bool
    • > GET request to /wp-admin/admin.php?page=revenueflex-projectSelectCreatePage
    • > Notice in wp-content/plugins/revenueflex-easy-ads/inc/helpers.php+4
    Undefined index: text_before
    • > GET request to /wp-admin/admin.php?page=revenueflex-updateEmailValidateKeyPage
    • > Notice in wp-content/plugins/revenueflex-easy-ads/pages/updateEmailValidateKeyPage.php+23
    Undefined index: email

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 items
  • 13× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/revenueflex-easy-ads/pages/subscriptionPage.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/revenueflex-easy-ads/pages/dashboardPage.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/revenueflex-easy-ads/inc.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/revenueflex-easy-ads/pages/userSettingsPage.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/revenueflex-easy-ads/pages/updateEmailValidateKeyPage.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/revenueflex-easy-ads/pages/startPage.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/revenueflex-easy-ads/pages/projectSettingsPage.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/revenueflex-easy-ads/pages/projectSelectCreatePage.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/revenueflex-easy-ads/inc/initPages.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/revenueflex-easy-ads/pages/updateUserSettingsPage.php:2

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
These are user-side errors you should fix
    • > GET request to /wp-admin/admin.php?page=revenueflex-projectSelectCreatePage
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=revenueflex-projectSelectCreatePage - Access to XMLHttpRequest at 'https://panel.revenueflex.com/rest/user/get' from origin '' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
    • > GET request to /wp-admin/admin.php?page=revenueflex-projectSelectCreatePage
    • > Network (severe)
    https://panel.revenueflex.com/rest/user/get - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/admin.php?page=revenueflex-updateUserSettingsPage
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'includes')" "TypeError: Cannot read properties of null (reading 'includes')\n at isRealEmail (/wp-content/plugins/revenueflex-easy-ads/assets/js/revenueflex.js?ver=6.3.1:1370:38)\n at revenueflex_updateUserSettingsPage (/wp-content/plugins/revenueflex-easy-ads/assets/js/revenueflex.js?ver=6.3.1:185:28)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/revenueflex-easy-ads/assets/js/revenueflex.js?ver=6.3.1:1127:9)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=revenueflex-userSettingsPage
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of null (reading 'includes')
    • > GET request to /wp-admin/admin.php?page=revenueflex-userSettingsPage
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of null (reading 'includes')" "TypeError: Cannot read properties of null (reading 'includes')\n at isRealEmail (/wp-content/plugins/revenueflex-easy-ads/assets/js/revenueflex.js?ver=6.3.1:1370:38)\n at revenueflex_userSettingsPage (/wp-content/plugins/revenueflex-easy-ads/assets/js/revenueflex.js?ver=6.3.1:130:18)\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/revenueflex-easy-ads/assets/js/revenueflex.js?ver=6.3.1:1126:9)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?page=revenueflex-projectSettingsPage
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=revenueflex-projectSettingsPage - Access to XMLHttpRequest at 'https://panel.revenueflex.com/rest/project/get' from origin '' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=revenueflex-dashboardPage
    • > Network (severe)
    https://panel.revenueflex.com/rest/project/get - Failed to load resource: net::ERR_FAILED
    • > GET request to /wp-admin/admin.php?page=revenueflex-dashboardPage
    • > Javascript (severe) in unknown
    /wp-admin/admin.php?page=revenueflex-dashboardPage - Access to XMLHttpRequest at 'https://panel.revenueflex.com/rest/project/get' from origin '' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that need to be fixed: Please take inspiration from this readme.txt

revenueflex-easy-ads/revenueflex.php 77% from 13 tests

The main PHP script in "Auto Ad Inserter - Increase Google Adsense and Ad Manager Revenue" version 1.5 is automatically included on every request by WordPress
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("revenueflex-easy-ads.php" instead of "revenueflex.php")
  • Description: Please keep the plugin description shorter than 140 characters (currently 214 characters long)
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

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
There were no executable files found in this plugin51,756 lines of code in 65 files:
LanguageFilesBlank linesComment linesLines of code
CSS188,13513835,193
JavaScript103,9782,34515,194
PHP156070971
PO File1132162377
SVG210021

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.08
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
Namespaces0
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%
Functions46
▷ Named functions4495.65%
▷ Anonymous functions24.35%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/revenueflex.png9.82KB5.61KB▼ 42.81%