74% adverts-click-tracker

Code Review | Wordpress Adverts Plugin - Adverts Click Tracker

WordPress plugin Wordpress Adverts Plugin - Adverts Click Tracker scored74%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-6.2
  • WordPress version: 6.3.1
  • First release: Sep 28, 2018
  • Latest release: May 5, 2023
  • Number of updates: 27
  • Update frequency: every 62.2 days
  • Top authors: taz_bambu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,283 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼0.47MB] [CPU: ▼11.68ms] Passed 4 tests

Analyzing server-side resources used by Wordpress Adverts Plugin - Adverts Click Tracker
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3544.70 ▼0.51
Dashboard /wp-admin3.55 ▲0.2157.74 ▼4.82
Posts /wp-admin/edit.php3.62 ▲0.2755.89 ▲12.89
Add New Post /wp-admin/post-new.php3.33 ▼2.5641.14 ▼48.72
Media Library /wp-admin/upload.php3.41 ▲0.1843.36 ▲7.34
Statistics /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker-Stats3.4143.85
Settings /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker3.3836.82
All Adverts /wp-admin/edit.php?post_type=webd_adverts3.4859.27
New Advert /wp-admin/post-new.php?post_type=webd_adverts3.3336.93
Category - PRO /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker-Category3.4144.30

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 20 new files
Database: 2 new tables, 6 new options
New tables
wp_advert_clicks
wp_adverts
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Wordpress Adverts Plugin - Adverts Click Tracker
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,171 ▲41015.28 ▲0.704.95 ▲3.2637.67 ▼0.40
Dashboard /wp-admin2,470 ▲2896.51 ▲0.83119.04 ▲24.53123.10 ▲80.40
Posts /wp-admin/edit.php2,403 ▲3243.63 ▲1.5951.71 ▲18.98104.60 ▲72.02
Add New Post /wp-admin/post-new.php1,651 ▲12323.16 ▲0.06658.10 ▼41.4937.13 ▼23.97
Media Library /wp-admin/upload.php1,552 ▲1494.43 ▲0.2487.50 ▼15.9489.18 ▲44.11
Statistics /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker-Stats1,1313.3140.3471.42
Settings /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker1,73110.25293.0163.85
All Adverts /wp-admin/edit.php?post_type=webd_adverts1,3703.6248.4171.83
New Advert /wp-admin/post-new.php?post_type=webd_adverts2,3247.42146.93144.43
Category - PRO /wp-admin/edit.php?post_type=webd_adverts&page=adverts-click-tracker-Category1,1263.2841.9880.73

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
You still need to fix the following
  • The uninstall procedure failed, leaving 2 tables in the database
    • wp_advert_clicks
    • wp_adverts
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting 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
The SRP test was a success

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 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes: The official readme.txt might help

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 | Executable files are not allowed as they can serve as attack vectors
Success! There were 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

Cyclomatic complexity and code structure are the fingerprint of this plugin
No complexity issues detected
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-pro.png26.83KB12.61KB▼ 52.99%
images/adverts-click-tracker.png36.85KB15.89KB▼ 56.88%
images/webdeveloping.png30.41KB16.21KB▼ 46.68%