77% adscend-adlock

Code Review | Adscend AdLock

WordPress plugin Adscend AdLock scored77%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: 6.3.1
  • 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,827 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.68MB] [CPU: ▼16.67ms] Passed 4 tests

Server-side resources used by Adscend AdLock
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0335.81 ▼4.75
Dashboard /wp-admin3.33 ▲0.0345.48 ▼6.63
Posts /wp-admin/edit.php3.38 ▲0.0248.58 ▲1.69
Add New Post /wp-admin/post-new.php3.11 ▼2.7734.36 ▼54.90
Media Library /wp-admin/upload.php3.25 ▲0.0232.42 ▼0.41
AdLock® Widgets /wp-admin/edit.php?post_type=adlock-widget3.2933.49
Add New /wp-admin/post-new.php?post_type=adlock-widget3.1131.52

Server storage [IO: ▲0.42MB] [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: 9 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Adscend AdLock: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,859 ▲12413.19 ▼1.194.04 ▲2.0840.92 ▼6.18
Dashboard /wp-admin2,237 ▲575.80 ▲0.8897.18 ▼18.1739.99 ▼5.92
Posts /wp-admin/edit.php2,120 ▲282.05 ▲0.0340.34 ▲2.3234.82 ▼1.99
Add New Post /wp-admin/post-new.php1,541 ▲823.15 ▼0.00655.41 ▼18.4252.13 ▼3.45
Media Library /wp-admin/upload.php1,419 ▲314.23 ▼0.0093.90 ▼17.1443.02 ▼7.23
AdLock® Widgets /wp-admin/edit.php?post_type=adlock-widget1,0811.9530.5330.84
Add New /wp-admin/post-new.php?post_type=adlock-widget1,6462.7765.0896.06

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These server-side errors were triggered
    • > 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
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > 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 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 87% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
  • Screenshots: These screenshots have no corresponding images in /assets: #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

The main PHP file in "Adscend AdLock" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("adscend-adlock.php" instead of "adlock.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 141 characters long)

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
No dangerous file extensions were detected225 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP16125192
CSS12121
JavaScript10012

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
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

All PNG images should be compressed to minimize bandwidth usage for end users
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-3.png219.37KB74.23KB▼ 66.16%
img/adscend-logo.png23.84KB9.77KB▼ 59.03%
screenshot-2.png60.45KB19.41KB▼ 67.89%
screenshot-1.png109.22KB45.45KB▼ 58.39%