84% adsimple-cookie-manager-for-wp

Code Review | AdSimple® Consent Manager for WP

WordPress plugin AdSimple® Consent Manager for WP scored84%from 54 tests.

About plugin

  • Plugin page: adsimple-cookie-m...
  • Plugin version: 2.0.9
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Mar 31, 2020
  • Latest release: Feb 10, 2023
  • Number of updates: 23
  • Update frequency: every 45.7 days
  • Top authors: adsimple (100%)

Code review

54 tests

User reviews

1 review

Install metrics

500+ active /3,818 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▼0.95ms] Passed 4 tests

An overview of server-side resources used by AdSimple® Consent Manager for WP
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.83 ▲0.3738.97 ▲2.63
Dashboard /wp-admin3.67 ▲0.3355.59 ▼1.79
Posts /wp-admin/edit.php3.72 ▲0.3749.03 ▲3.35
Add New Post /wp-admin/post-new.php6.27 ▲0.3989.38 ▼8.00
Media Library /wp-admin/upload.php3.61 ▲0.3842.91 ▲10.23

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 34 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for AdSimple® Consent Manager for WP
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,853 ▲10713.58 ▼0.644.43 ▲2.5735.46 ▼6.61
Dashboard /wp-admin2,247 ▲626.07 ▲0.99109.78 ▲9.7377.94 ▲34.78
Posts /wp-admin/edit.php2,134 ▲452.03 ▲0.0335.81 ▼1.9937.79 ▲2.70
Add New Post /wp-admin/post-new.php1,681 ▲16722.49 ▲4.86676.53 ▲33.3847.03 ▼11.93
Media Library /wp-admin/upload.php1,427 ▲394.25 ▲0.06104.03 ▼3.2951.22 ▲3.92

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

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
  • 11× PHP files trigger errors when accessed directly with GET requests (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/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/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/controllers/popup.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/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/services/rest.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/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/controllers/options.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

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: cookie, manager, blocking, dsgvo, hinweis...

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

The main file in "AdSimple® Consent Manager for WP" v. 2.0.9 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Text Domain: The text domain name must use dashes instead of underscores, and it must be lowercase
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("adsimple-cookie-manager-for-wp.php" instead of "adsimple-cookie-manager.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin2,372 lines of code in 28 files:
LanguageFilesBlank linesComment linesLines of code
PHP244801,4681,629
CSS2937538
PO File13838135
JavaScript110270

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
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
Namespaces0
Interfaces0
Traits0
Classes19
▷ Abstract classes00.00%
▷ Concrete classes19100.00%
▷ Final classes00.00%
Methods168
▷ Static methods12071.43%
▷ Public methods14485.71%
▷ Protected methods127.14%
▷ Private methods127.14%
Functions5
▷ Named functions00.00%
▷ Anonymous functions5100.00%
Constants9
▷ Global constants00.00%
▷ Class constants9100.00%
▷ Public constants9100.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
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%