87% adscend-adlock

Code Review | Adscend AdLock

WordPress plugin Adscend AdLock scored 87% from 54 tests.

About plugin

  • Plugin page: adscend-adlock
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 5.9.2
  • First release: Mar 8, 2014
  • Latest release: Apr 10, 2014
  • Number of updates: 5
  • Update frequency: every 6.6 days
  • Top authors: adscendmedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,629 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.88MB] [CPU: ▼331.80ms] Passed 4 tests

A check of server-side resources used by Adscend AdLock
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.0955.02 ▲3.91
Dashboard /wp-admin3.47 ▲0.0631.98 ▼4.23
Posts /wp-admin/edit.php3.70 ▲0.0644.32 ▼4.75
Add New Post /wp-admin/post-new.php3.29 ▼3.6929.56 ▼1,318.50
Media Library /wp-admin/upload.php3.35 ▲0.0525.05 ▲0.29
Add New /wp-admin/post-new.php?post_type=adlock-widget3.2825.85
AdLock® Widgets /wp-admin/edit.php?post_type=adlock-widget3.3927.85

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Adscend AdLock
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,827 ▲7316.25 ▲0.555.91 ▲0.122.16 ▼0.59
Dashboard /wp-admin2,927 ▲666.26 ▲0.03148.25 ▲10.86152.55 ▼19.20
Posts /wp-admin/edit.php2,723 ▲353.25 ▲0.0166.76 ▲2.50146.53 ▲6.08
Add New Post /wp-admin/post-new.php1,688 ▲2816.94 ▼5.12416.74 ▲0.11161.67 ▲5.90
Media Library /wp-admin/upload.php1,730 ▲325.55 ▲0.06161.08 ▲17.69234.21 ▲45.56
Add New /wp-admin/post-new.php?post_type=adlock-widget2,1894.2891.64220.42
AdLock® Widgets /wp-admin/edit.php?post_type=adlock-widget1,3993.1661.55112.26

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The plugin uninstalled successfully, without leaving any zombie files or tables

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
    • > GET request to /wp-admin/post-new.php?post_type=adlock-widget
    • > Notice in wp-content/plugins/adscend-adlock/adlock.php+193
    Undefined index: widgetmeta_noncename
    • > GET request to /wp-admin/post-new.php?post_type=adlock-widget
    • > Notice in wp-content/plugins/adscend-adlock/adlock.php+136
    Undefined variable: checklistcode

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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/adscend-adlock/adlock.php:269

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
  • Screenshots: Please add images for these screenshots: #1 (** Your Widget ** - When a visitor wants to access your selected content, a prompt such as this will appear. You can customize the appearance and text, and the sponsored offers shown.), #2 (** Integrates into Dashboard ** - Seen in this screenshot, AdLock integrates right into the Wordpress Dashboard.), #3 (** Easy to Use ** - After getting your code from the Adscend Media Publisher portal, getting it on your site is as easy as pasting in the code and selecting the pages in which it will be shown.)
The official readme.txt might help

adscend-adlock/adlock.php 85% from 13 tests

Analyzing the main PHP file in "Adscend AdLock" version 1.0.1
The following require your attention:
  • Description: The description should be shorter than 140 characters (currently 141 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("adscend-adlock.php" instead of "adlock.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin225 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16125192
CSS12121
JavaScript10012

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions11
▷ Named functions11100.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
4 PNG files occupy 0.40MB with 0.25MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png109.22KB45.45KB▼ 58.39%
screenshot-2.png60.45KB19.41KB▼ 67.89%
img/adscend-logo.png23.84KB9.77KB▼ 59.03%
screenshot-3.png219.37KB74.23KB▼ 66.16%