10% advertsafe

Code Review | advertSAFE Site Seal

WordPress plugin advertSAFE Site Seal scored 10% from 54 tests.

About plugin

  • Plugin page: advertsafe
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.6
  • WordPress version: 5.8.1
  • First release: Aug 2, 2013
  • Latest release: Oct 1, 2013
  • Number of updates: 29
  • Update frequency: every 2.1 days
  • Top authors: weptile (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,637 total downloads

Benchmarks

Plugin footprint 40% 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
    • > Deprecated in wp-content/plugins/advertsafe/advertsafe.php+169
    Methods with the same name as their class will not be constructors in a future version of PHP; advertsafeWidget has a deprecated constructor

Server metrics [RAM: ▼1.83MB] [CPU: ▼181.62ms] Passed 4 tests

A check of server-side resources used by advertSAFE Site Seal
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /1.80 ▼1.043.62 ▼18.15
Dashboard /wp-admin1.82 ▼1.243.80 ▼34.82
Posts /wp-admin/edit.php1.82 ▼1.293.80 ▼26.86
Add New Post /wp-admin/post-new.php1.82 ▼3.623.90 ▼646.66
Media Library /wp-admin/upload.php1.82 ▼1.184.08 ▼17.14
advertSAFE site seal /wp-admin/options-general.php?page=advertsafe1.823.47

Server storage [IO: ▲1.28MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
This plugin installed successfully
Filesystem: 7 new files
Database: no new tables, 3 new options
New WordPress options
adversafe_txt
widget_advertsafewidget
widget_advertsafewidget1

Browser metrics Passed 4 tests

Checking browser requirements for advertSAFE Site Seal
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,671 ▲7015.59 ▼0.444.95 ▼0.2074.69 ▲3.72
Dashboard /wp-admin2,935 ▲406.12 ▼0.01115.93 ▼16.07166.54 ▼9.69
Posts /wp-admin/edit.php2,745 ▲83.22 ▼0.0163.26 ▲0.01133.48 ▼7.61
Add New Post /wp-admin/post-new.php3,701 ▼3418.34 ▼0.39419.40 ▼40.21159.33 ▼10.26
Media Library /wp-admin/upload.php1,757 ▲55.50 ▼0.10141.78 ▲1.30181.84 ▼8.82
advertSAFE site seal /wp-admin/options-general.php?page=advertsafe1,0982.3754.95104.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Deprecated in wp-content/plugins/advertsafe/advertsafe.php+169
    Methods with the same name as their class will not be constructors in a future version of PHP; advertsafeWidget has a deprecated constructor
  • The uninstall procedure has failed, leaving 2 options in the database
    • widget_advertsafewidget1
    • widget_advertsafewidget

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/options-general.php?page=advertsafe
    • > Deprecated in wp-content/plugins/advertsafe/advertsafe.php+169
    Methods with the same name as their class will not be constructors in a future version of PHP; advertsafeWidget has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=advertsafe
    • > Deprecated in wp-content/plugins/advertsafe/advertsafe.php+250
    Methods with the same name as their class will not be constructors in a future version of PHP; advertsafeWidget1 has a deprecated constructor
    • > GET request to /wp-admin/options-general.php?page=advertsafe
    • > User notice in wp-includes/functions.php+5663
    add_shortcode was called incorrectly. Invalid shortcode name: advertSAFE site seal. Do not use spaces or reserved characters: & / < > [ ] = Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/options-general.php?page=advertsafe
    • > Deprecated in wp-content/plugins/advertsafe/advertsafe.php+295
    Function create_function() is deprecated
    • > GET request to /wp-admin/options-general.php?page=advertsafe
    • > User notice in wp-includes/functions.php+5663
    add_shortcode was called incorrectly. Invalid shortcode name: advertSAFE user ID. Do not use spaces or reserved characters: & / < > [ ] = Please see Debugging in WordPress for more information. (This message was added in version 4.4.0.)
    • > GET request to /wp-admin/options-general.php?page=advertsafe
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in advertsafeWidget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=advertsafe
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in advertsafeWidget1 is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% 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× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/advertsafe/advertsafe.php

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (advertSAFE site seal), #2 (Backend notes 1), #3 (Backend notes 2), #4 (Backend notes 3)
  • Donate link: Invalid URI found ("")
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

advertsafe/advertsafe.php 92% from 13 tests

Analyzing the main PHP file in "advertSAFE Site Seal" version 1.1
It is important to fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 585 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected162 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP114511162

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png15.11KB5.19KB▼ 65.63%
badges/200x80_ap.png15.11KB5.19KB▼ 65.63%