88% adredux

Code Review | AdRedux - Insert Ads & Codes

WordPress plugin AdRedux - Insert Ads & Codes scored 88% from 54 tests.

About plugin

  • Plugin page: adredux
  • Plugin version: 1.2.4
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.5.1
  • WordPress version: 5.9.2
  • First release: Oct 24, 2017
  • Latest release: Oct 14, 2020
  • Number of updates: 35
  • Update frequency: every 31.1 days
  • Top authors: reduxthemes (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 4,592 total downloads

Benchmarks

Plugin footprint Passed 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.22MB] [CPU: ▼311.55ms] Passed 4 tests

An overview of server-side resources used by AdRedux - Insert Ads & Codes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.2379.23 ▼32.17
Dashboard /wp-admin3.66 ▲0.2637.31 ▲3.73
Posts /wp-admin/edit.php3.88 ▲0.2543.33 ▲5.60
Add New Post /wp-admin/post-new.php7.12 ▲0.1597.16 ▼1,220.32
Media Library /wp-admin/upload.php3.54 ▲0.2526.45 ▲2.55

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 1 new option
New WordPress options
adredux_settings

Browser metrics Passed 4 tests

Checking browser requirements for AdRedux - Insert Ads & Codes
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,809 ▲5516.17 ▲0.165.73 ▼0.952.16 ▼0.62
Dashboard /wp-admin2,905 ▲516.16 ▼0.03121.06 ▼22.33240.07 ▲31.72
Posts /wp-admin/edit.php2,708 ▲203.24 ▲0.0169.72 ▲5.10143.95 ▼7.95
Add New Post /wp-admin/post-new.php1,681 ▲2019.80 ▲3.11385.90 ▼44.62200.26 ▲44.75
Media Library /wp-admin/upload.php1,718 ▲175.47 ▼0.08145.22 ▼6.60233.72 ▲39.94

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstaller ran successfully

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 0% 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
Please fix the following
  • 5× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/adredux/admin/settings-page.php
    • > /wp-content/plugins/adredux/adredux.php
    • > /wp-content/plugins/adredux/defaults.php
    • > /wp-content/plugins/adredux/uninstall.php
    • > /wp-content/plugins/adredux/adredux_displayads.php
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > 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: 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 settings_fields() in wp-content/plugins/adredux/admin/partials/dashboard-general.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/adredux/admin/partials/dashboard-sidebar.php:7

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)
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: You are using too many tags: 35 tag instead of maximum 10
The official readme.txt might help

adredux/adredux.php 92% from 13 tests

"AdRedux - Insert Ads & Codes" version 1.2.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 653 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected808 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11232147776
CSS27332

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.49
Average class complexity36.00
▷ Minimum class complexity8.00
▷ Maximum class complexity64.00
Average method complexity4.40
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods1990.48%
▷ Protected methods00.00%
▷ Private methods29.52%
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
4 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-1544x500.png58.77KB27.66KB▼ 52.92%
assets/icon-256x256.png23.54KB9.99KB▼ 57.57%
assets/banner-772x250.png26.27KB11.30KB▼ 56.99%
assets/icon-128x128.png7.87KB4.16KB▼ 47.16%