10% advertikon-freeshipping-teaser

Code Review | Smart Notifications

WordPress plugin Smart Notifications scored10%from 54 tests.

About plugin

  • Plugin page: advertikon-freesh...
  • Plugin version: 2.0.0
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.9.8
  • WordPress version: 6.3.1
  • First release: Apr 14, 2016
  • Latest release: Nov 26, 2018
  • Number of updates: 12
  • Update frequency: every 79.7 days
  • Top authors: advertikon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,566 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Please fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Warning in wp-content/plugins/advertikon-freeshipping-teaser/notification.php+21
    require_once(wp-content/plugins/advertikon-freeshipping-teaser/../library/advertikon.php): failed to open stream: No such file or directory

Server metrics [RAM: ▲0.00MB] [CPU: ▼0.92ms] Passed 4 tests

Server-side resources used by Smart Notifications
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.89 ▲0.73
Dashboard /wp-admin3.31 ▲0.0048.27 ▲0.99
Posts /wp-admin/edit.php3.36 ▲0.0045.46 ▲1.08
Add New Post /wp-admin/post-new.php5.89 ▲0.0086.61 ▼6.49
Media Library /wp-admin/upload.php3.23 ▲0.0035.94 ▲1.32

Server storage [IO: ▲0.77MB] [DB: ▲0.00MB] 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, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Smart Notifications
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.21 ▼1.221.91 ▲0.1043.54 ▼3.25
Dashboard /wp-admin2,206 ▲145.86 ▲0.9097.84 ▼14.8737.85 ▼6.36
Posts /wp-admin/edit.php2,086 ▼32.00 ▲0.0136.05 ▲3.4838.39 ▲5.61
Add New Post /wp-admin/post-new.php1,514 ▼517.40 ▼5.96706.62 ▲42.9654.14 ▼0.15
Media Library /wp-admin/upload.php1,382 ▼64.21 ▲0.0399.04 ▲4.2145.13 ▲1.59

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/advertikon-freeshipping-teaser/storage/templates/simple.php
  • 15× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: shadow_color in wp-content/plugins/advertikon-freeshipping-teaser/storage/templates/simple.php on line 7
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/advertikon-freeshipping-teaser/storage/templates/simple.php on line 23
    • > PHP Notice
      Undefined variable: border_width in wp-content/plugins/advertikon-freeshipping-teaser/storage/templates/simple.php on line 6
    • > PHP Notice
      Undefined variable: shadow_dispersion in wp-content/plugins/advertikon-freeshipping-teaser/storage/templates/simple.php on line 7
    • > PHP Notice
      Undefined variable: border_color in wp-content/plugins/advertikon-freeshipping-teaser/storage/templates/simple.php on line 6
    • > PHP Notice
      Undefined variable: width in wp-content/plugins/advertikon-freeshipping-teaser/storage/templates/simple.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'WC_Settings_Page' not found in wp-content/plugins/advertikon-freeshipping-teaser/includes/setting.php:7
    • > PHP Notice
      Undefined variable: shadow_horizontal in wp-content/plugins/advertikon-freeshipping-teaser/storage/templates/simple.php on line 7
    • > PHP Notice
      Undefined variable: name in wp-content/plugins/advertikon-freeshipping-teaser/storage/templates/simple.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/advertikon-freeshipping-teaser/notification.php:21

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 81% 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 need to be fixed:
  • Donate link: Invalid URI found ("")
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === advertikon-freeshipping-teaser === )
  • Screenshots: These screenshots need descriptions #1, #2, #3, #4, #5 in advertikon-freeshipping-teaser/assets to your readme.txt
The official readme.txt is a good inspiration

advertikon-freeshipping-teaser/notification.php 85% from 13 tests

"Smart Notifications" version 2.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advertikon-freeshipping-teaser.php" instead of "notification.php")
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin5,240 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP155362643,052
JavaScript54441,0841,344
CSS29528614
HTML1230142
PO File1292988

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.55
Average class complexity34.42
▷ Minimum class complexity1.00
▷ Maximum class complexity142.00
Average method complexity4.62
▷ Minimum method complexity1.00
▷ Maximum method complexity96.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes18.33%
▷ Concrete classes1191.67%
▷ Final classes00.00%
Methods110
▷ Static methods2018.18%
▷ Public methods6962.73%
▷ Protected methods4137.27%
▷ Private methods00.00%
Functions2
▷ Named functions150.00%
▷ Anonymous functions150.00%
Constants16
▷ Global constants00.00%
▷ Class constants16100.00%
▷ Public constants16100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.52MB with 0.33MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/smart_notifications_settings.png112.48KB37.26KB▼ 66.87%
assets/img/smart_notifications_events.png84.47KB33.58KB▼ 60.24%
assets/img/smart_notifications_appearance_setting.png62.02KB24.37KB▼ 60.71%
assets/img/smart_notifications_activate.png93.56KB33.10KB▼ 64.63%
assets/img/admin_blocks.png35.46KB14.31KB▼ 59.65%