84% adverts-click-tracker

Code Review | Wordpress Adverts Plugin - Adverts Click Tracker

WordPress plugin Wordpress Adverts Plugin - Adverts Click Tracker scored 84% from 54 tests.

About plugin

  • Plugin page: adverts-click-tra...
  • Plugin version: 1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.9.1
  • WordPress version: 5.9.2
  • First release: Sep 28, 2018
  • Latest release: Feb 28, 2022
  • Number of updates: 24
  • Update frequency: every 52.0 days
  • Top authors: taz_bambu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 1,520 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼0.86MB] [CPU: ▼275.74ms] Passed 4 tests

Analyzing server-side resources used by Wordpress Adverts Plugin - Adverts Click Tracker
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2284.76 ▲36.86
Dashboard /wp-admin3.51 ▲0.1067.45 ▲34.46
Posts /wp-admin/edit.php3.73 ▲0.0970.50 ▲29.96
Add New Post /wp-admin/post-new.php3.29 ▼3.6855.78 ▼1,204.23
Media Library /wp-admin/upload.php3.36 ▲0.0668.75 ▲40.11
Category - PRO /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker-Category3.3659.92
Settings /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker3.3351.44
Statistics /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker-Stats3.3655.12
New Advert /wp-admin/post-new.php?post_type=webd_adverts3.2856.36
All Adverts /wp-admin/edit.php?post_type=webd_adverts3.5069.43

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 20 new files
Database: 2 new tables, no new options
New tables
wp_advert_clicks
wp_adverts

Browser metrics Passed 4 tests

An overview of browser requirements for Wordpress Adverts Plugin - Adverts Click Tracker
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /4,317 ▲56318.56 ▲2.6111.64 ▲4.983.02 ▲0.57
Dashboard /wp-admin3,294 ▲4337.62 ▲1.45151.14 ▲18.56253.29 ▲94.58
Posts /wp-admin/edit.php3,115 ▲4585.01 ▲1.7785.26 ▲21.14259.75 ▲118.56
Add New Post /wp-admin/post-new.php1,793 ▲10320.25 ▲0.10412.94 ▲17.16169.78 ▲4.27
Media Library /wp-admin/upload.php1,900 ▲1996.01 ▲0.49108.64 ▼25.84256.40 ▲71.40
Category - PRO /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker-Category1,4294.7675.05150.07
Settings /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker2,48613.06312.61190.54
Statistics /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker-Stats1,4404.9673.46154.69
New Advert /wp-admin/post-new.php?post_type=webd_adverts3,02410.00175.82218.38
All Adverts /wp-admin/edit.php?post_type=webd_adverts1,7965.0778.10152.00

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 2 tables in the database
    • wp_advert_clicks
    • wp_adverts

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker
    • > Notice in wp-content/plugins/adverts-click-tracker/class-admin.php+251
    Undefined index: tab
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=webd_adverts
    • > Notice in wp-content/plugins/adverts-click-tracker/class-admin.php+369
    Undefined index: AdvertsClickTrackerdesc
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=webd_adverts
    • > Notice in wp-content/plugins/adverts-click-tracker/class-admin.php+395
    Trying to get property 'ID' of non-object
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=webd_adverts
    • > Notice in wp-content/plugins/adverts-click-tracker/class-admin.php+375
    Undefined index: AdvertsClickTrackerurl
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=webd_adverts
    • > Notice in wp-content/plugins/adverts-click-tracker/class-admin.php+379
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/post-new.php?post_type=webd_adverts
    • > Notice in wp-content/plugins/adverts-click-tracker/class-admin.php+379
    Undefined index: AdvertsClickTrackerexpdate

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Everything seems fine, however this is by no means an exhaustive test

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Attributes that require attention: You can look at the official readme.txt

adverts-click-tracker/adverts-click-tracker.php Passed 13 tests

The main PHP file in "Wordpress Adverts Plugin - Adverts Click Tracker" ver. 1.3 adds more information about the plugin and also serves as the entry point for this plugin
138 characters long description:
Create and display classified adverts anywhere on your WordPress website with a shortcode, click tracking feature - check the statistics.

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
Everything looks great! No dangerous files found in this plugin2,910 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS4103621,574
SVG100685
PHP211223624
JavaScript212127

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity19.50
▷ Minimum class complexity2.00
▷ Maximum class complexity37.00
Average method complexity2.12
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods33
▷ Static methods00.00%
▷ Public methods33100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.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
3 PNG files occupy 0.09MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/adverts-click-tracker.png36.85KB15.89KB▼ 56.88%
images/webdeveloping.png30.41KB16.21KB▼ 46.68%
images/adverts-click-tracker-pro.png26.83KB12.61KB▼ 52.99%