78% adredux

Code Review | AdRedux - Insert Ads & Analytics Codes

WordPress plugin AdRedux - Insert Ads & Analytics Codes scored78%from 54 tests.

About plugin

  • Plugin page: adredux
  • Plugin version: 1.3.5
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-6.3
  • WordPress version: 6.3.1
  • First release: Oct 24, 2017
  • Latest release: Aug 24, 2023
  • Number of updates: 46
  • Update frequency: every 46.3 days
  • Top authors: reduxthemes (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /5,894 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.23MB] [CPU: ▼5.99ms] Passed 4 tests

Analyzing server-side resources used by AdRedux - Insert Ads & Analytics Codes
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1835.27 ▼10.42
Dashboard /wp-admin3.56 ▲0.2152.31 ▼14.87
Posts /wp-admin/edit.php3.64 ▲0.2857.93 ▲3.68
Add New Post /wp-admin/post-new.php6.14 ▲0.26101.44 ▼2.35
Media Library /wp-admin/upload.php3.48 ▲0.2645.89 ▲7.31

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
adredux_settings
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

AdRedux - Insert Ads & Analytics Codes: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,836 ▲6513.27 ▼0.911.88 ▼0.2842.56 ▼1.20
Dashboard /wp-admin2,225 ▲375.03 ▲0.16109.91 ▲2.9642.31 ▲1.33
Posts /wp-admin/edit.php2,105 ▲162.04 ▼0.0040.46 ▼1.3135.39 ▼0.92
Add New Post /wp-admin/post-new.php1,547 ▲2823.22 ▲0.06659.69 ▼7.3959.32 ▲11.93
Media Library /wp-admin/upload.php1,401 ▲164.13 ▼0.06103.99 ▲1.7345.43 ▼2.22

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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 | 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
  • 5× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/adredux/defaults.php
    • > /wp-content/plugins/adredux/admin/settings-page.php
    • > /wp-content/plugins/adredux/uninstall.php
    • > /wp-content/plugins/adredux/adredux_displayads.php
    • > /wp-content/plugins/adredux/adredux.php
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'Adredux_Settings_Page' not found in wp-content/plugins/adredux/admin/partials/dashboard-page.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/adredux/admin/partials/dashboard-data.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_plugin_data() in wp-content/plugins/adredux/admin/partials/dashboard-about.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/adredux/admin/partials/dashboard-sidebar.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/adredux/admin/partials/dashboard-general.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
5 plugin tags: analytics, google adsense, ad manager, ads, google analytics

adredux/adredux.php 92% from 13 tests

"AdRedux - Insert Ads & Analytics Codes" version 1.3.5's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 240 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin868 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11239147836
CSS27332

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity38.00
▷ Minimum class complexity8.00
▷ Maximum class complexity68.00
Average method complexity4.43
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods22
▷ Static methods14.55%
▷ Public methods2090.91%
▷ Protected methods00.00%
▷ Private methods29.09%
Functions9
▷ Named functions777.78%
▷ Anonymous functions222.22%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.07MB with 0.03MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner.png58.77KB27.66KB▼ 52.92%
assets/icon.png7.87KB4.16KB▼ 47.16%