10% easy-chitika-lite

Code Review | Easy Chitika

WordPress plugin Easy Chitika scored10%from 54 tests.

About plugin

  • Plugin page: easy-chitika-lite
  • Plugin version: 3.10
  • PHP version: 7.4.16
  • WordPress compatibility: 3.2-4.8
  • WordPress version: 6.3.1
  • First release: May 8, 2014
  • Latest release: Aug 1, 2017
  • Number of updates: 35
  • Update frequency: every 33.8 days
  • Top authors: manojtd (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /9,791 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • The plugin cannot be installed
    • > Deprecated in wp-content/plugins/easy-chitika-lite/easy-chitika.php+41
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyChitika has a deprecated constructor

Server metrics [RAM: ▼1.81MB] [CPU: ▼62.17ms] Passed 4 tests

An overview of server-side resources used by Easy Chitika
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.19 ▼1.276.14 ▼37.75
Dashboard /wp-admin2.21 ▼1.138.21 ▼58.39
Posts /wp-admin/edit.php2.21 ▼1.156.37 ▼49.25
Add New Post /wp-admin/post-new.php2.21 ▼3.686.81 ▼103.27
Media Library /wp-admin/upload.php2.21 ▼1.025.81 ▼30.33
Easy Chitika /wp-admin/options-general.php?page=easy-chitika-lite2.216.55

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 37 new files
Database: no new tables, 9 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
ezAPI-Easy-Chitika-twentytwentyone
db_upgraded
widget_chitikawidget
can_compress_scripts
ezAPI-Easy-Chitika-twentytwentyone-Chitika
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Easy Chitika
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.27 ▼0.081.78 ▲0.1545.88 ▲5.64
Dashboard /wp-admin2,199 ▲195.49 ▼0.1887.80 ▼12.7040.15 ▼2.63
Posts /wp-admin/edit.php2,104 ▲72.11 ▲0.0839.93 ▲0.5834.88 ▼4.77
Add New Post /wp-admin/post-new.php1,529 ▼623.25 ▲5.19635.84 ▼19.8556.76 ▼17.01
Media Library /wp-admin/upload.php1,407 ▲44.16 ▼0.0695.36 ▼11.9946.17 ▲2.02
Easy Chitika /wp-admin/options-general.php?page=easy-chitika-lite4,3724.06106.7499.07

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/easy-chitika-lite/easy-chitika.php+41
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyChitika has a deprecated constructor
  • This plugin does not fully uninstall, leaving 9 options in the database
    • ezAPI-Easy-Chitika-twentytwentyone-Chitika
    • widget_recent-comments
    • db_upgraded
    • ezAPI-Easy-Chitika-twentytwentyone
    • widget_chitikawidget
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

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)
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/easy-chitika.php+41
    Methods with the same name as their class will not be constructors in a future version of PHP; EasyChitika has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+91
    Methods with the same name as their class will not be constructors in a future version of PHP; ezOption has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+166
    Methods with the same name as their class will not be constructors in a future version of PHP; checkbox has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+200
    Methods with the same name as their class will not be constructors in a future version of PHP; radio has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+240
    Methods with the same name as their class will not be constructors in a future version of PHP; select has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+292
    Methods with the same name as their class will not be constructors in a future version of PHP; message has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+319
    Methods with the same name as their class will not be constructors in a future version of PHP; blurb has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+363
    Methods with the same name as their class will not be constructors in a future version of PHP; textarea has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+390
    Methods with the same name as their class will not be constructors in a future version of PHP; text has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+422
    Methods with the same name as their class will not be constructors in a future version of PHP; colorPicker has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+456
    Methods with the same name as their class will not be constructors in a future version of PHP; mTab has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+505
    Methods with the same name as their class will not be constructors in a future version of PHP; miniTab has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+562
    Methods with the same name as their class will not be constructors in a future version of PHP; ezTab has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+864
    Methods with the same name as their class will not be constructors in a future version of PHP; ezOverview has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+902
    Methods with the same name as their class will not be constructors in a future version of PHP; EzAdminTab has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+1026
    Methods with the same name as their class will not be constructors in a future version of PHP; ezAbout has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/ezAPI.php+1183
    Methods with the same name as their class will not be constructors in a future version of PHP; ezAdsPlugin has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/providers.php+541
    Methods with the same name as their class will not be constructors in a future version of PHP; providerWidget has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/chitika.php+22
    Methods with the same name as their class will not be constructors in a future version of PHP; ChitikaWidget has a deprecated constructor
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Notice in wp-content/plugins/easy-chitika-lite/easy-chitika.php+112
    Trying to access array offset on value of type null
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=easy-chitika-lite
    • > Deprecated in wp-content/plugins/easy-chitika-lite/chitika.php+68
    Function create_function() is deprecated

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 1× PHP files output text when accessed directly:
    • > /wp-content/plugins/easy-chitika-lite/validate.php
  • 9× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/easy-chitika-lite/defaults.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'ezOption' not found in wp-content/plugins/easy-chitika-lite/providers.php:22
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/easy-chitika-lite/myPlugins.php:300
    • > PHP Warning
      include_once(): Failed opening 'ABSPATHwp-admin/includes/plugin.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/easy-chitika-lite/ezDenyLite.php on line 22
    • > 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-chitika-lite/ezDenyLite.php on line 22
    • > PHP Fatal error
      Uncaught Error: Class 'providerWidget' not found in wp-content/plugins/easy-chitika-lite/chitika.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-chitika-lite/providers.php:541
    • > PHP Notice
      Undefined variable: pwd in wp-content/plugins/easy-chitika-lite/validate.php on line 44
    • > PHP Warning
      include_once(ABSPATHwp-admin/includes/plugin.php): failed to open stream: No such file or directory in wp-content/plugins/easy-chitika-lite/ezDenyLite.php on line 22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Add images for these screenshots: #1 (*Easy Chitika* "Overview" tab.), #2 (Admin tab showing ad slot locations), #3 (How to set the options for Chitika.)
Please take inspiration from this readme.txt

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

The main PHP script in "Easy Chitika" version 3.10 is automatically included on every request by WordPress
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 213 characters long)
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("easy-chitika-lite.php" instead of "easy-chitika.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin5,392 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP105041943,493
JavaScript31821701,838
CSS18061

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.25
Average class complexity12.29
▷ Minimum class complexity1.00
▷ Maximum class complexity54.00
Average method complexity3.32
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes28
▷ Abstract classes00.00%
▷ Concrete classes28100.00%
▷ Final classes00.00%
Methods136
▷ Static methods1611.76%
▷ Public methods136100.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

All PNG images should be compressed to minimize bandwidth usage for end users
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%
chitika.png11.79KB4.74KB▼ 59.77%
ezColor/hv.png2.80KB7.32KB0.00%
img/ezsupport.png3.13KB2.01KB▼ 35.75%
img/ezpaypal.png9.22KB3.44KB▼ 62.72%