74% addefend-easy-integration

Code Review | AdDefend Easy Integration

WordPress plugin AdDefend Easy Integration scored 74% from 54 tests.

About plugin

  • Plugin page: addefend-easy-int...
  • Plugin version: 1.12
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-5.9
  • WordPress version: 6.3.1
  • First release: May 12, 2017
  • Latest release: Mar 11, 2022
  • Number of updates: 51
  • Update frequency: every 34.6 days
  • Top authors: melkarim (98.04%)danielnikolov (3.92%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,981 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.11MB] [CPU: ▲2.60ms] Passed 4 tests

Server-side resources used by AdDefend Easy Integration
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2243.39 ▲6.06
Dashboard /wp-admin3.40 ▲0.0943.95 ▼7.78
Posts /wp-admin/edit.php3.51 ▲0.1550.38 ▲6.50
Add New Post /wp-admin/post-new.php5.98 ▲0.0996.97 ▲6.77
Media Library /wp-admin/upload.php3.32 ▲0.0936.54 ▲5.62
AdDefend integration /wp-admin/options-general.php?page=AdDefend3.2933.16

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 11 new files
Database: 1 new table, 6 new options
New tables
wp_addefend
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by AdDefend Easy Integration
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.17 ▼1.204.85 ▲3.1943.39 ▲5.81
Dashboard /wp-admin2,207 ▲225.84 ▼0.0197.95 ▼1.6839.35 ▼2.74
Posts /wp-admin/edit.php2,090 ▲12.00 ▼0.0635.54 ▲0.5634.31 ▼0.85
Add New Post /wp-admin/post-new.php1,545 ▲618.24 ▼4.96629.50 ▼36.4354.60 ▲3.01
Media Library /wp-admin/upload.php1,386 ▼54.20 ▼0.0192.94 ▼7.5839.45 ▼7.93
AdDefend integration /wp-admin/options-general.php?page=AdDefend9892.1522.1927.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_addefend
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
Please take a closer look at the following
  • 8× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addefend-easy-integration/View/options.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/addefend-easy-integration/Components/proxy_integration.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/addefend-easy-integration/addefend-easy-integration.php:26
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/addefend-easy-integration/Components/script_integration.php on line 4
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/addefend-easy-integration/Components/script_integration.php on line 6
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/addefend-easy-integration/Components/script_integration.php on line 6
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/addefend-easy-integration/Components/script_integration.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/addefend-easy-integration/Components/proxy_internal_forwarding.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need your attention:
  • Tags: There are too many tags (14 tag instead of maximum 10)
You can look at the official readme.txt

addefend-easy-integration/addefend-easy-integration.php 92% from 13 tests

The main PHP script in "AdDefend Easy Integration" version 1.12 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected741 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP74736663
SVG11178

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.36
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%
Functions17
▷ Named functions17100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png4.79KB2.53KB▼ 47.07%