10% easy-ads-lite

Code Review | Easy Ads

WordPress plugin Easy Ads scored 10% from 54 tests.

About plugin

  • Plugin page: easy-ads-lite
  • Plugin version: 4.20
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-4.8
  • WordPress version: 5.8.1
  • First release: Apr 17, 2012
  • Latest release: Aug 1, 2017
  • Number of updates: 85
  • Update frequency: every 22.7 days
  • Top authors: manojtd (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

50+ active / 57,123 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
These installer errors require your attention
  • The plugin cannot be installed
    • > Notice in wp-content/plugins/easy-ads-lite/providers.php+114
    Trying to get property 'defaults' of non-object

Server metrics [RAM: ▼1.22MB] [CPU: ▼217.38ms] Passed 4 tests

Analyzing server-side resources used by Easy Ads
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.42 ▼0.416.75 ▼26.16
Dashboard /wp-admin2.43 ▼0.6310.24 ▼38.81
Posts /wp-admin/edit.php2.43 ▼0.687.10 ▼39.40
Add New Post /wp-admin/post-new.php2.43 ▼3.017.08 ▼765.13
Media Library /wp-admin/upload.php2.43 ▼0.576.39 ▼21.44
Easy Ads /wp-admin/options-general.php?page=easy-ads-lite2.436.99

Server storage [IO: ▲0.98MB] [DB: ▲0.10MB] Passed 3 tests

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 46 new files
Database: no new tables, 9 new options
New WordPress options
widget_chitikawidget
ezAPI-Easy-Ads-twentytwentyone-Chitika
ezAPI-Easy-Ads-twentytwentyone-BidVertiser
widget_adsensewidget
widget_bidvertiserwidget
widget_clicksorwidget
ezAPI-Easy-Ads-twentytwentyone-Clicksor
ezAPI-Easy-Ads-twentytwentyone
ezAPI-Easy-Ads-twentytwentyone-AdSense

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Ads
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,690 ▲9415.82 ▲0.2510.18 ▲1.3350.01 ▲0.19
Dashboard /wp-admin2,978 ▲475.97 ▼0.01148.22 ▼8.40109.52 ▼2.07
Posts /wp-admin/edit.php2,744 ▲52.72 ▼0.0063.30 ▼1.4279.70 ▼9.95
Add New Post /wp-admin/post-new.php1,675 ▲318.81 ▲0.06371.45 ▼16.59102.59 ▼4.56
Media Library /wp-admin/upload.php1,815 ▼75.02 ▼0.01153.10 ▲9.56120.43 ▼6.60
Easy Ads /wp-admin/options-general.php?page=easy-ads-lite5,5974.01113.17164.64

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/easy-ads-lite/easy-ads.php+110
    Trying to access array offset on value of type null
  • The uninstall procedure has failed, leaving 9 options in the database
    • widget_bidvertiserwidget
    • ezAPI-Easy-Ads-twentytwentyone
    • ezAPI-Easy-Ads-twentytwentyone-BidVertiser
    • ezAPI-Easy-Ads-twentytwentyone-Clicksor
    • ezAPI-Easy-Ads-twentytwentyone-Chitika
    • widget_adsensewidget
    • widget_chitikawidget
    • widget_clicksorwidget
    • ezAPI-Easy-Ads-twentytwentyone-AdSense

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=easy-ads-lite
    • > Notice in wp-content/plugins/easy-ads-lite/easy-ads.php+110
    Trying to access array offset on value of type null
  • 4 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-ads-lite
    • > Deprecated in wp-content/plugins/easy-ads-lite/google.php+69
    Function create_function() is deprecated

SRP 0% 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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-ads-lite/validate.php
  • 12× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/easy-ads-lite/ezDenyLite.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'providerWidget' not found in wp-content/plugins/easy-ads-lite/bidvertiser.php:22
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/easy-ads-lite/ezDenyLite.php on line 22
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/easy-ads-lite/myPlugins.php:300
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/easy-ads-lite/ezDenyLite.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'providerWidget' not found in wp-content/plugins/easy-ads-lite/chitika.php:22
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/easy-ads-lite/defaults.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'providerWidget' not found in wp-content/plugins/easy-ads-lite/google.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'providerWidget' not found in wp-content/plugins/easy-ads-lite/clicksor.php:22
    • > PHP Notice
      Undefined variable: pwd in wp-content/plugins/easy-ads-lite/validate.php on line 44

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (*Easy Ads* "Overview" tab.), #2 (Admin tab showing ad slot locations.), #3 (Pro Featires.), #4 (How to set the options for Google AdSense.), #5 (How to set the options for Chitika.)
You can take inspiration from this readme.txt

easy-ads-lite/easy-ads.php 85% from 13 tests

Analyzing the main PHP file in "Easy Ads" version 4.20
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 534 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("easy-ads-lite.php" instead of "easy-ads.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin6,702 lines of code in 18 files:
LanguageFilesBlank linesComment linesLines of code
PHP147412594,803
JavaScript31821701,838
CSS18061

PHP code Passed 2 tests

A brief analysis 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.24
Average class complexity9.81
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity2.94
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes48
▷ Abstract classes00.00%
▷ Concrete classes48100.00%
▷ Final classes00.00%
Methods218
▷ Static methods219.63%
▷ Public methods218100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions466.67%
▷ Anonymous functions233.33%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
ezColor/hs.png2.55KB7.54KB0.00%
img/ezpaypal.png9.22KB3.44KB▼ 62.72%
chitika.png11.79KB4.74KB▼ 59.77%
ezColor/hv.png2.80KB7.32KB0.00%
img/ezsupport.png3.13KB2.01KB▼ 35.75%