84% adklick-advertising-management

Code Review | AdKlick Advertising Management

WordPress plugin AdKlick Advertising Management scored84%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: 6.3.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,369 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.33MB] [CPU: ▼20.25ms] Passed 4 tests

An overview of server-side resources used by AdKlick Advertising Management
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.43 ▼0.0332.20 ▼13.51
Dashboard /wp-admin3.32 ▼0.0247.10 ▼16.59
Posts /wp-admin/edit.php3.37 ▲0.0245.01 ▼4.93
Add New Post /wp-admin/post-new.php4.61 ▼1.2743.47 ▼45.98
Media Library /wp-admin/upload.php3.24 ▲0.0236.23 ▲1.41

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
db_upgraded
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for AdKlick Advertising Management
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6913.57 ▼1.106.36 ▲4.2845.26 ▲1.65
Dashboard /wp-admin2,224 ▲365.86 ▲0.95101.87 ▼12.5577.89 ▲35.59
Posts /wp-admin/edit.php2,101 ▲122.02 ▲0.0234.04 ▼16.4532.79 ▼8.68
Add New Post /wp-admin/post-new.php1,690 ▲17624.43 ▲6.89722.04 ▲33.2649.44 ▼2.76
Media Library /wp-admin/upload.php1,406 ▲214.13 ▼0.0499.17 ▼4.4772.73 ▲29.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 7× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > 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/footer.php:22
    • > 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/ajax.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/adklick-advertising-management/content.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adklick-advertising-management/admin-page.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Setup overview), #2 (Advertising format configuration), #3 (Rules/Filter configuration)
The official readme.txt is a good inspiration

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
Please make the necessary changes and fix the following:
  • Main file name: It is recommended to name the main PHP file 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 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
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

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
17 compressed PNG files occupy 0.03MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/iphone_off.png2.52KB2.54KB0.00%
includes/images/pointer.png0.71KB0.62KB▼ 12.02%
includes/images/iphone_slider.png1.20KB1.29KB0.00%
includes/images/iphone_slider_right.png0.31KB0.41KB0.00%
includes/images/iphone_slider_left.png0.32KB0.44KB0.00%