84% myagilepixel

Code Review | My Agile Pixel - The GDPR Analytics and Tracking Pixel Solution

WordPress plugin My Agile Pixel - The GDPR Analytics and Tracking Pixel Solution scored84%from 54 tests.

About plugin

  • Plugin page: myagilepixel
  • Plugin version: 2.2.4
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4.0-6.4
  • WordPress version: 6.3.1
  • First release: Jul 19, 2022
  • Latest release: Nov 9, 2023
  • Number of updates: 81
  • Update frequency: every 6.0 days
  • Top authors: formulaagile (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /5,757 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.43MB] [CPU: ▼4.50ms] Passed 4 tests

An overview of server-side resources used by My Agile Pixel - The GDPR Analytics and Tracking Pixel Solution
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.90 ▲0.4441.74 ▲4.83
Dashboard /wp-admin3.75 ▲0.4050.04 ▼10.91
Posts /wp-admin/edit.php3.86 ▲0.5144.50 ▼3.77
Add New Post /wp-admin/post-new.php6.33 ▲0.4483.51 ▼6.90
Media Library /wp-admin/upload.php3.67 ▲0.4438.04 ▲3.57
My Agile Pixel /wp-admin/admin.php?page=my-agile-pixel_settings3.7335.73
User Property Tracking /wp-admin/admin.php?page=my-agile-pixel_user_property_assoc3.7536.81

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 46 new files
Database: no new tables, 11 new options
New WordPress options
AgilePixel
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments
AgilePixeldb_version_number
theysaidso_admin_options
AgilePixel_rconfig
AgilePixeldo_sync_last_execution
widget_recent-posts
...

Browser metrics Passed 4 tests

My Agile Pixel - The GDPR Analytics and Tracking Pixel Solution: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,819 ▲7214.26 ▼0.082.89 ▲1.1644.89 ▲4.13
Dashboard /wp-admin2,208 ▲345.54 ▼0.0195.24 ▲3.9569.23 ▲29.04
Posts /wp-admin/edit.php2,125 ▲251.95 ▼0.0836.13 ▼0.8132.36 ▼1.15
Add New Post /wp-admin/post-new.php1,700 ▲17422.34 ▼0.55774.54 ▲82.2848.55 ▼5.53
Media Library /wp-admin/upload.php1,428 ▲284.14 ▼0.05103.85 ▲1.3171.51 ▲26.38
My Agile Pixel /wp-admin/admin.php?page=my-agile-pixel_settings2,4782.1339.3669.94
User Property Tracking /wp-admin/admin.php?page=my-agile-pixel_user_property_assoc1,3122.1234.4032.00

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 11 options
    • AgilePixeldo_sync_last_execution
    • AgilePixeldo_sync_now
    • AgilePixeldb_version_number
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • AgilePixel_rconfig
    • theysaidso_admin_options
    • db_upgraded
    • ...

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
Even though no errors were found, 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
  • 14× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_locale() in wp-content/plugins/myagilepixel/admin/views/inc/inc.sidebar.php:6
    • > PHP Notice
      Undefined variable: the_options in wp-content/plugins/myagilepixel/admin/views/inc/inc.user_property_list.php on line 1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/myagilepixel/admin/views/inc/inc.facebook_tab.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/myagilepixel/admin/views/inc/inc.tiktok_tab.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/myagilepixel/admin/views/inc/inc.user_property_assoc.edit.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/myagilepixel/admin/views/inc/inc.advanced_settings_tab.php:4
    • > PHP Warning
      Use of undefined constant MAPX_PLUGIN_NAME - assumed 'MAPX_PLUGIN_NAME' (this will throw an Error in a future version of PHP) in wp-content/plugins/myagilepixel/includes/my-agile-pixel-class.php on line 17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/myagilepixel/admin/views/inc/inc.general_tab.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/myagilepixel/myagilepixel.php:24
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html__() in wp-content/plugins/myagilepixel/admin/views/user_property_assoc.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
You can take inspiration from this readme.txt

myagilepixel/myagilepixel.php Passed 13 tests

The entry point to "My Agile Pixel - The GDPR Analytics and Tracking Pixel Solution" version 2.2.4 is a PHP file that has certain tags in its header comment area
93 characters long description:
Prevent legal compliance issues when using Google Analytics, Facebook Pixel and TikTok Pixel.

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Everything looks great! No dangerous files found in this plugin24,035 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
CSS48,8131718,285
PHP141,4065754,483
JavaScript3270115867
PO File1133255400

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 162)
Cyclomatic complexity
Average complexity per logical line of code0.56
Average class complexity231.67
▷ Minimum class complexity160.00
▷ Maximum class complexity325.00
Average method complexity10.75
▷ Minimum method complexity1.00
▷ Maximum method complexity162.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods71
▷ Static methods2738.03%
▷ Public methods5780.28%
▷ Protected methods00.00%
▷ Private methods1419.72%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants33
▷ Global constants33100.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
3 PNG files occupy 0.13MB with 0.08MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/banner-privacy-eng.png68.72KB29.13KB▼ 57.61%
admin/img/banner-privacy-ita.png64.09KB27.32KB▼ 57.37%
admin/img/menu-icon.png1.60KB0.66KB▼ 58.99%