10% ads-ez

Code Review | Ads EZ

WordPress plugin Ads EZ scored10%from 54 tests.

About plugin

  • Plugin page: ads-ez
  • Plugin version: 3.20
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.8
  • WordPress version: 6.3.1
  • First release: Mar 6, 2015
  • Latest release: Jul 31, 2017
  • Number of updates: 108
  • Update frequency: every 8.1 days
  • Top authors: manojtd (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active /5,585 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/ads-ez/DbHelper.php+228
    Function get_magic_quotes_gpc() is deprecated

Server metrics [RAM: ▲0.08MB] [CPU: ▼0.05ms] Passed 4 tests

Analyzing server-side resources used by Ads EZ
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0841.22 ▼2.37
Dashboard /wp-admin3.39 ▲0.0847.19 ▼0.57
Posts /wp-admin/edit.php3.50 ▲0.1448.87 ▲3.38
Add New Post /wp-admin/post-new.php5.97 ▲0.0885.25 ▼0.17
Media Library /wp-admin/upload.php3.31 ▲0.0837.99 ▲2.90

Server storage [IO: ▲2.44MB] [DB: ▲0.01MB] Passed 3 tests

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 131 new files
Database: 5 new tables, 7 new options
New tables
wp_ads_htmlAds
wp_ads_categories
wp_ads_banners
wp_ads_administrator
wp_ads_options_meta
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
adsEz
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Ads EZ
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲5813.34 ▼1.421.73 ▼0.4241.67 ▼1.32
Dashboard /wp-admin2,213 ▲254.88 ▼0.01105.54 ▼14.2538.76 ▼5.32
Posts /wp-admin/edit.php2,090 ▼22.01 ▼0.0133.42 ▼1.7734.18 ▲0.97
Add New Post /wp-admin/post-new.php1,537 ▼523.01 ▲4.83684.87 ▲18.0957.75 ▼0.74
Media Library /wp-admin/upload.php1,392 ▲14.20 ▲0.05112.48 ▲15.7947.80 ▲5.93
Ads EZ Lite /wp-admin/ads-ez.php260.440.0813.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure failed, leaving 5 tables in the database
    • wp_ads_banners
    • wp_ads_htmlAds
    • wp_ads_options_meta
    • wp_ads_categories
    • wp_ads_administrator
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% 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)
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
The following issues need your attention
  • 40× PHP files output text when accessed directly (only 10 are shown):
    • > /wp-content/plugins/ads-ez/admin/banners.php
    • > /wp-content/plugins/ads-ez/afr.php
    • > /wp-content/plugins/ads-ez/admin/pub.php
    • > /wp-content/plugins/ads-ez/admin/categories.php
    • > /wp-content/plugins/ads-ez/admin/reinstall.php
    • > /wp-content/plugins/ads-ez/admin/htmlAds-edit.php
    • > /wp-content/plugins/ads-ez/admin/header.php
    • > /wp-content/plugins/ads-ez/admin/banners-new.php
    • > /wp-content/plugins/ads-ez/admin/stats.php
    • > /wp-content/plugins/ads-ez/admin/update.php
  • 15× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: small in wp-content/plugins/ads-ez/fallback.php on line 12
    • > PHP Fatal error
      Uncaught Error: Class 'EZ' not found in wp-content/plugins/ads-ez/admin/tour.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function renderFooter() in wp-content/plugins/ads-ez/admin/footer.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ads-ez/EzPlugin.php:386
    • > PHP Fatal error
      Uncaught Error: Call to undefined function menuShown() in wp-content/plugins/ads-ez/admin/intro.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ads-ez/EzPlugin.php:386
    • > PHP Notice
      Undefined variable: height in wp-content/plugins/ads-ez/fallback.php on line 12
    • > PHP Notice
      Undefined variable: height in wp-content/plugins/ads-ez/fallback.php on line 12
    • > PHP Notice
      Undefined variable: height in wp-content/plugins/ads-ez/fallback.php on line 12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/ads-ez/admin/options-default.php:4

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/ads-ez.php
    • > Network (severe)
    wp-admin/ads-ez.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Screenshots: These screenshots require images: #1 (Dashboard, showing the beautifully designed admin interface.), #2 (Tour and Help, to quickly get started with Ads EZ.), #3 (Admin interface elements.), #4 (Listing your banners.), #5 (Generating invocation codes.), #6 (Configuration optons, showing help.), #7 (Editing categories.), #8 (Admin page tour sample screen, showing a dark theme.), #9 (Ad serving statistics and charts in the Pro version.), #10 (Advanced tools and Cache management in the Pro version.), #11 (OpenX/Revive replacement tools in the Pro version.), #12 (Drag-and-drop banners upload in the Pro version.)
The official readme.txt might help

ads-ez/ads-ez.php 92% from 13 tests

The entry point to "Ads EZ" version 3.20 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 210 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected10,748 lines of code in 88 files:
LanguageFilesBlank linesComment linesLines of code
PHP635451856,888
CSS112161031,867
JavaScript1199951,189
SVG200749
SQL16055

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity46.71
▷ Minimum class complexity1.00
▷ Maximum class complexity157.00
Average method complexity3.88
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes14
▷ Abstract classes17.14%
▷ Concrete classes1392.86%
▷ Final classes00.00%
Methods225
▷ Static methods9341.33%
▷ Public methods21997.33%
▷ Protected methods00.00%
▷ Private methods62.67%
Functions41
▷ Named functions41100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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
26 compressed PNG files occupy 0.82MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/star-on.png0.62KB0.61KB▼ 1.58%
screenshot-2.png49.31KB51.88KB0.00%
screenshot-6.png32.10KB33.00KB0.00%
screenshot-4.png54.08KB56.98KB0.00%
screenshot-10.png46.47KB48.24KB0.00%