10% advertsafe

Code Review | advertSAFE Site Seal

WordPress plugin advertSAFE Site Seal scored10%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: 6.3.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,965 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 cannot be installed
    • > User notice in wp-includes/functions.php+5905
    Function 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.)

Server metrics [RAM: ▼1.96MB] [CPU: ▼58.36ms] Passed 4 tests

This is a short check of server-side resources used by advertSAFE Site Seal
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.90 ▼38.77
Dashboard /wp-admin2.05 ▼1.2610.48 ▼47.74
Posts /wp-admin/edit.php2.05 ▼1.317.45 ▼46.77
Add New Post /wp-admin/post-new.php2.05 ▼3.846.52 ▼100.14
Media Library /wp-admin/upload.php2.05 ▼1.185.86 ▼32.54
advertSAFE site seal /wp-admin/options-general.php?page=advertsafe2.055.64

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 7 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
adversafe_txt
db_upgraded
can_compress_scripts
widget_advertsafewidget
widget_advertsafewidget1
widget_recent-comments

Browser metrics Passed 4 tests

advertSAFE Site Seal: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.002.29 ▲0.4148.70 ▲0.98
Dashboard /wp-admin2,202 ▲225.67 ▲0.0490.79 ▲3.4241.36 ▼4.06
Posts /wp-admin/edit.php2,104 ▲12.16 ▲0.1539.72 ▼1.4136.88 ▼1.38
Add New Post /wp-admin/post-new.php1,548 ▲1723.22 ▼0.06659.95 ▼30.2058.21 ▲5.18
Media Library /wp-admin/upload.php1,404 ▲44.30 ▲0.0598.79 ▼14.6043.49 ▼8.81
advertSAFE site seal /wp-admin/options-general.php?page=advertsafe8371.9822.4028.52

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function 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.)
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_advertsafewidget1
    • widget_recent-comments
    • widget_recent-posts
    • widget_advertsafewidget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
    • > GET request to /wp-admin/options-general.php?page=advertsafe
    • > User notice in wp-includes/functions.php+5905
    Function 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+5905
    Function 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+5546
    The called constructor method for WP_Widget class 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+5546
    The called constructor method for WP_Widget class in advertsafeWidget1 is deprecated since version 4.3.0! Use __construct() instead.

SRP 50% 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
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/advertsafe/advertsafe.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 81% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that need to be fixed:
  • Tags: You are using too many tags: 12 tag instead of maximum 10
  • Donate link: Please fix this invalid url: ""
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (advertSAFE site seal), #2 (Backend notes 1), #3 (Backend notes 2), #4 (Backend notes 3)
You can look at the official readme.txt

advertsafe/advertsafe.php 92% from 13 tests

The main PHP script in "advertSAFE Site Seal" version 1.1 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 585 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
There were no executable files found in this plugin162 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
There are no cyclomatic complexity problems 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
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
badges/200x80_ap.png15.11KB5.19KB▼ 65.63%
screenshot-1.png15.11KB5.19KB▼ 65.63%