10% easy-ad-picker

Code Review | Easy Ad Picker

WordPress plugin Easy Ad Picker scored10%from 54 tests.

About plugin

  • Plugin page: easy-ad-picker
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.4
  • WordPress version: 6.3.1
  • First release: Mar 30, 2018
  • Latest release: May 1, 2018
  • Number of updates: 16
  • Update frequency: every 2.0 days
  • Top authors: easyadpicker (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,380 total downloads

Benchmarks

Plugin footprint 58% 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
  • This plugin did not install gracefully
    • > Notice in wp-content/plugins/easy-ad-picker/admin/class-settings.php+13
    Trying to get property 'key' of non-object

Server metrics [RAM: ▲0.03MB] [CPU: ▲79.32ms] Passed 4 tests

Server-side resources used by Easy Ad Picker
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0444.01 ▲0.96
Dashboard /wp-admin3.34 ▲0.04167.13 ▲120.17
Posts /wp-admin/edit.php3.39 ▲0.03182.61 ▲131.77
Add New Post /wp-admin/post-new.php5.94 ▲0.05190.17 ▲93.65
Media Library /wp-admin/upload.php3.26 ▲0.03139.84 ▲102.49
Dashboard /wp-admin/admin.php?page=EAP_dashboard_beta3.26151.75

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 57 new files
Database: 8 new tables, 8 new options
New tables
wp_easyadpicker_advertiser_properties
wp_easyadpicker_product_words
wp_easyadpicker_post_ads
wp_easyadpicker_products
wp_easyadpicker_stats_clicks
wp_easyadpicker_material_words
wp_easyadpicker_advertisers
wp_easyadpicker_materials
New WordPress options
widget_recent-comments
widget_theysaidso_widget
WPEAP_key
can_compress_scripts
db_upgraded
widget_recent-posts
theysaidso_admin_options
widget_eap_admin_widget_products_filter

Browser metrics Passed 4 tests

This is an overview of browser requirements for Easy Ad Picker
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,941 ▲18014.26 ▼0.095.68 ▲3.9443.54 ▼2.74
Dashboard /wp-admin2,214 ▲365.49 ▼0.25106.83 ▲1.1390.35 ▲44.34
Posts /wp-admin/edit.php2,135 ▲322.67 ▲0.6643.06 ▼0.6234.01 ▼5.86
Add New Post /wp-admin/post-new.php6,262 ▲4,73626.57 ▲3.62868.80 ▲211.7956.07 ▼16.38
Media Library /wp-admin/upload.php1,425 ▲315.05 ▲0.86109.24 ▲14.8172.06 ▲28.80
Dashboard /wp-admin/admin.php?page=EAP_dashboard_beta8502.6131.5827.71

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • can_compress_scripts
    • WPEAP_key
    • widget_theysaidso_widget
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_eap_admin_widget_products_filter

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/easy-ad-picker/admin/views/dashboard_beta.php
  • 17× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_row() on null in wp-content/plugins/easy-ad-picker/admin/views/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'EAP_Admin_Settings' not found in wp-content/plugins/easy-ad-picker/admin/views/settings-style.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'EAP_Admin_Materials' not found in wp-content/plugins/easy-ad-picker/admin/views/ads-delete.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/easy-ad-picker/admin/class-widgets.php:3
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/easy-ad-picker/admin/views/collages.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'EAP_Admin_Collages' not found in wp-content/plugins/easy-ad-picker/admin/views/collages-add.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'EAP_Admin_Stats' not found in wp-content/plugins/easy-ad-picker/admin/views/dashboard.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'EAP_Admin_Collages' not found in wp-content/plugins/easy-ad-picker/admin/views/collages-delete.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'EAP_Admin_Advertisers' not found in wp-content/plugins/easy-ad-picker/admin/views/advertisers-importproducts.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'EAP_Admin_Advertisers' not found in wp-content/plugins/easy-ad-picker/admin/views/ads-edit.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 86% 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
Please fix the following attributes:
  • Donate link: Invalid URI ("")
You can look at the official readme.txt

easy-ad-picker/easyadpicker.php 77% from 13 tests

The main file in "Easy Ad Picker" v. 1.0.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 155 characters long)
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("easy-ad-picker.php" instead of "easyadpicker.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin6,296 lines of code in 48 files:
LanguageFilesBlank linesComment linesLines of code
PHP411,1571013,834
CSS2262231,632
JavaScript423238773
PO File1212657

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity13.12
▷ Minimum class complexity1.00
▷ Maximum class complexity65.00
Average method complexity3.14
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods136
▷ Static methods3827.94%
▷ Public methods136100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
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
7 PNG files occupy 0.07MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/crosshair.png3.00KB1.01KB▼ 66.32%
images/advertisers.png12.86KB6.19KB▼ 51.85%
images/banners.png10.95KB5.57KB▼ 49.12%
images/icon.png1.76KB0.75KB▼ 57.27%
images/advertenties.png15.50KB6.83KB▼ 55.90%