73% pod-marketing-analytics

Code Review | POD Marketing Analytics

WordPress plugin POD Marketing Analytics scored73%from 54 tests.

About plugin

  • Plugin page: pod-marketing-ana...
  • Plugin version: 0.2.17
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-5.7.2
  • WordPress version: 6.3.1
  • First release: Sep 1, 2017
  • Latest release: Jun 9, 2021
  • Number of updates: 40
  • Update frequency: every 34.5 days
  • Top authors: jumpdemand (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,100 total downloads

Benchmarks

Plugin footprint 64% from 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.23MB] [CPU: ▲525.41ms] 50% from 4 tests

Analyzing server-side resources used by POD Marketing Analytics
Please have a look at the following items
  • CPU: Try to keep total CPU usage under 500.00ms (currently 746.35ms on /wp-admin/options-general.php?page=pod_options)
  • Extra CPU: Extra CPU usage should be kept under 200.00ms (currently 525.41ms on /wp-admin/options-general.php?page=pod_options)
PageMemory (MB)CPU Time (ms)
Home /3.93 ▲0.4749.51 ▲6.38
Dashboard /wp-admin3.83 ▲0.48812.00 ▲751.29
Posts /wp-admin/edit.php3.88 ▲0.52736.74 ▲689.13
Add New Post /wp-admin/post-new.php5.35 ▼0.54869.76 ▲776.00
Media Library /wp-admin/upload.php3.75 ▲0.52690.36 ▲654.82
Pod Marketing /wp-admin/options-general.php?page=pod_options3.65746.35

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 28 new files
Database: 2 new tables, 7 new options
New tables
wp_cart_product
wp_cart
New WordPress options
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
pod_version
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for POD Marketing Analytics
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,191 ▲44515.45 ▲1.2042.93 ▲41.0742.69 ▲0.41
Dashboard /wp-admin2,218 ▲305.90 ▲1.00105.48 ▲3.5938.19 ▼2.83
Posts /wp-admin/edit.php2,104 ▲122.18 ▲0.1733.72 ▼1.8132.48 ▲1.62
Add New Post /wp-admin/post-new.php6,248 ▲4,72019.14 ▼4.03916.28 ▲224.3140.16 ▼13.87
Media Library /wp-admin/upload.php1,403 ▲124.20 ▲0.0395.52 ▼5.3942.62 ▼2.33
Pod Marketing /wp-admin/options-general.php?page=pod_options9041.7623.6129.52

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_cart
    • wp_cart_product
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_theysaidso_widget
    • pod_version
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wc_get_page_id() in wp-content/plugins/pod-marketing-analytics/recover-cart.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/pod-marketing-analytics/partials/tinymce-editor.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PodMarketing\\plugin_dir_path() in wp-content/plugins/pod-marketing-analytics/PodMarketingAnalytics.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PodMarketing\\add_shortcode() in wp-content/plugins/pod-marketing-analytics/class-SCCollector.php:123
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PodMarketing\\add_action() in wp-content/plugins/pod-marketing-analytics/linked-forms.php:495
    • > PHP Fatal error
      Uncaught Error: Call to undefined function PodMarketing\\add_action() in wp-content/plugins/pod-marketing-analytics/landing-pages.php:13

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

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention: The official readme.txt might help

pod-marketing-analytics/PodMarketingAnalytics.php 92% from 13 tests

This is the main PHP file of "POD Marketing Analytics" version 0.2.17, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("pod-marketing-analytics.php" instead of "PodMarketingAnalytics.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,500 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP74251302,132
JavaScript104018282
XML40085
CSS1071

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity63.00
▷ Minimum class complexity10.00
▷ Maximum class complexity116.00
Average method complexity2.58
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods26
▷ Static methods934.62%
▷ Public methods2492.31%
▷ Protected methods00.00%
▷ Private methods27.69%
Functions73
▷ Named functions6791.78%
▷ Anonymous functions68.22%
Constants14
▷ Global constants14100.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
5 PNG files occupy 0.05MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/icons/favicon.png3.34KB2.27KB▼ 32.03%
images/Screenshot2.png29.99KB10.67KB▼ 64.41%
images/favicon.png2.44KB1.85KB▼ 24.22%
images/ActiveDEMAND-Transparent.png4.98KB2.64KB▼ 47.02%
images/Screenshot3.png11.68KB5.25KB▼ 55.07%