94% adklick-advertising-management

Code Review | AdKlick Advertising Management

WordPress plugin AdKlick Advertising Management scored 94% from 54 tests.

About plugin

  • Plugin page: adklick-advertisi...
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.1
  • WordPress version: 5.8.1
  • First release: Mar 24, 2016
  • Latest release: Apr 30, 2016
  • Number of updates: 4
  • Update frequency: every 9.2 days
  • Top authors: adklicknet (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active / 2,083 total downloads

Benchmarks

Plugin footprint Passed 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.19MB] [CPU: ▼147.41ms] Passed 4 tests

A check of server-side resources used by AdKlick Advertising Management
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.81 ▼0.0321.24 ▼2.33
Dashboard /wp-admin3.08 ▲0.0131.28 ▼3.92
Posts /wp-admin/edit.php3.13 ▲0.0229.02 ▼1.10
Add New Post /wp-admin/post-new.php4.67 ▼0.7739.77 ▼582.28
Media Library /wp-admin/upload.php3.02 ▲0.0222.84 ▲1.07

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 42 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by AdKlick Advertising Management
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,686 ▲8515.84 ▼0.166.44 ▲1.5478.06 ▲3.58
Dashboard /wp-admin2,949 ▲536.15 ▲0.01114.14 ▼17.67183.92 ▲14.50
Posts /wp-admin/edit.php2,760 ▲233.11 ▼0.1163.49 ▲0.47138.65 ▼1.76
Add New Post /wp-admin/post-new.php2,331 ▼1,58715.90 ▼3.45413.66 ▼50.32167.57 ▼0.57
Media Library /wp-admin/upload.php1,769 ▲205.54 ▲0.01124.60 ▼37.88202.95 ▼0.10

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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 following issues need your attention
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/adklick-advertising-management/content.php:2
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_URL - assumed 'WP_PLUGIN_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/adklick-advertising-management/wp-adklick.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adklick-advertising-management/admin-page.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adklick-advertising-management/admin-page.php:2
    • > PHP Warning
      Use of undefined constant WP_PLUGIN_DIR - assumed 'WP_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/adklick-advertising-management/wp-adklick.php on line 15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adklick-advertising-management/ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adklick-advertising-management/footer.php:22

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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:
  • Screenshots: Please add images for these screenshots: #1 (Setup overview), #2 (Advertising format configuration), #3 (Rules/Filter configuration)
The official readme.txt might help

adklick-advertising-management/wp-adklick.php 92% from 13 tests

"AdKlick Advertising Management" version 1.3's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("adklick-advertising-management.php" instead of "wp-adklick.php")

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
Success! There were no dangerous files found in this plugin2,880 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript82292371,637
PHP86211909
CSS1507334

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.31
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%
Functions22
▷ Named functions22100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
17 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/pointer.png0.71KB0.62KB▼ 12.02%
includes/images/iphone_on.png5.27KB2.24KB▼ 57.44%
includes/images/iphone_off.png2.52KB2.54KB0.00%
includes/images/hs.png2.62KB7.54KB0.00%
includes/images/ClosedTabBackground.png0.48KB0.32KB▼ 33.68%