94% adsimple-cookie-manager-for-wp

Code Review | AdSimple® Cookie Manager for WP

WordPress plugin AdSimple® Cookie Manager for WP scored 94% from 54 tests.

About plugin

  • Plugin page: adsimple-cookie-m...
  • Plugin version: 2.0.8
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-5.8.1
  • WordPress version: 5.9.2
  • First release: Mar 31, 2020
  • Latest release: Dec 7, 2021
  • Number of updates: 16
  • Update frequency: every 38.8 days
  • Top authors: adsimple (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active / 2,358 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.34MB] [CPU: ▼289.43ms] Passed 4 tests

An overview of server-side resources used by AdSimple® Cookie Manager for WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.88 ▲0.3656.67 ▲7.19
Dashboard /wp-admin3.72 ▲0.3235.18 ▼1.96
Posts /wp-admin/edit.php4.01 ▲0.3739.80 ▲1.92
Add New Post /wp-admin/post-new.php7.26 ▲0.2996.30 ▼1,151.20
Media Library /wp-admin/upload.php3.68 ▲0.3825.25 ▼6.48

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 34 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

A check of browser resources used by AdSimple® Cookie Manager for WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,836 ▲8215.71 ▼0.075.94 ▼1.552.25 ▼0.53
Dashboard /wp-admin2,965 ▲1146.29 ▲0.12116.68 ▼19.22187.26 ▲23.48
Posts /wp-admin/edit.php2,749 ▲613.14 ▼0.0968.43 ▲5.84154.39 ▲16.97
Add New Post /wp-admin/post-new.php1,681 ▼3018.20 ▼2.60384.85 ▼44.25182.40 ▲21.58
Media Library /wp-admin/upload.php1,761 ▲635.71 ▲0.19124.48 ▼20.55210.35 ▲8.97

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
This plugin's uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means 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
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AS_CM_Classes_Controller' not found in wp-content/plugins/adsimple-cookie-manager-for-wp/includes/controllers/design.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/adsimple-cookie-manager-for-wp/adsimple-cookie-manager.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'AS_CM_Classes_Controller' not found in wp-content/plugins/adsimple-cookie-manager-for-wp/includes/services/locale.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'AS_CM_Classes_Controller' not found in wp-content/plugins/adsimple-cookie-manager-for-wp/includes/controllers/after_activate.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'AS_CM_Classes_Controller' not found in wp-content/plugins/adsimple-cookie-manager-for-wp/includes/controllers/extensions/rocket.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'AS_CM_Classes_Controller' not found in wp-content/plugins/adsimple-cookie-manager-for-wp/includes/services/rest.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'AS_CM_Classes_Item' not found in wp-content/plugins/adsimple-cookie-manager-for-wp/includes/services/cache/loader.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'AS_CM_Classes_Controller' not found in wp-content/plugins/adsimple-cookie-manager-for-wp/includes/controllers/shortcodes.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'AS_CM_Classes_Controller' not found in wp-content/plugins/adsimple-cookie-manager-for-wp/includes/services/cache/manager.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'AS_CM_Classes_Controller' not found in wp-content/plugins/adsimple-cookie-manager-for-wp/includes/controllers/options.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found


Plugin configuration 93% from 29 tests

readme.txt Passed 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
8 plugin tags: popup, cookie, hinweis, blocking, dsgvo...

adsimple-cookie-manager-for-wp/adsimple-cookie-manager.php 85% from 13 tests

The principal PHP file in "AdSimple® Cookie Manager for WP" v. 2.0.8 is loaded by WordPress automatically on each request
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("adsimple-cookie-manager-for-wp.php" instead of "adsimple-cookie-manager.php")
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected2,371 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PO File13838135

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity13.05
▷ Minimum class complexity2.00
▷ Maximum class complexity38.00
Average method complexity2.35
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
▷ Static methods12071.43%
▷ Public methods14485.71%
▷ Protected methods127.14%
▷ Private methods127.14%
▷ Named functions00.00%
▷ Anonymous functions5100.00%
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 0.18MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/dashboard/images/tinymce.png1.12KB0.60KB▼ 46.42%
assets/dashboard/images/background.png182.73KB126.31KB▼ 30.88%
assets/dashboard/images/logo.png4.41KB2.99KB▼ 32.28%
assets/dashboard/images/icon.png0.90KB0.58KB▼ 35.22%