84% marketing-insights

Code Review | Marketing Insights

WordPress plugin Marketing Insights scored84%from 54 tests.

About plugin

  • Plugin page: marketing-insights
  • Plugin version: 1.0.16
  • PHP compatiblity: 7.4 or newer+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.4.1
  • WordPress version: 6.3.1
  • First release: Dec 19, 2022
  • Latest release: Nov 16, 2023
  • Number of updates: 102
  • Update frequency: every 3.3 days
  • Top authors: dashhounddev (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

200+ active /1,931 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼9.78ms] Passed 4 tests

Server-side resources used by Marketing Insights
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0633.33 ▼9.17
Dashboard /wp-admin3.38 ▲0.0445.35 ▼14.53
Posts /wp-admin/edit.php3.43 ▲0.0843.23 ▼4.71
Add New Post /wp-admin/post-new.php5.98 ▲0.0983.10 ▼10.70
Media Library /wp-admin/upload.php3.30 ▲0.0737.41 ▲2.94

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: no new tables, 7 new options
New WordPress options
can_compress_scripts
marketingInsights_isValidated
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Marketing Insights
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲10013.91 ▼0.328.61 ▲6.9845.07 ▼0.88
Dashboard /wp-admin2,241 ▲645.20 ▼0.3791.19 ▼2.1737.27 ▼2.33
Posts /wp-admin/edit.php2,144 ▲412.46 ▲0.5138.11 ▼0.3734.73 ▼2.91
Add New Post /wp-admin/post-new.php1,547 ▲2123.89 ▲0.66613.45 ▼82.4035.65 ▼26.76
Media Library /wp-admin/upload.php1,443 ▲494.86 ▲0.65101.76 ▼6.7442.79 ▼4.67

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 were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/marketing-insights/Marketing_Insights.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
8 plugin tags: advertising, behavioral, demographic, business intelligence, marketing insights...

marketing-insights/Marketing_Insights.php 85% from 13 tests

The primary PHP file in "Marketing Insights" version 1.0.16 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("marketing-insights.php" instead of "Marketing_Insights.php")
  • Requires PHP: Please use periods and digits for the required version (ex. "7.0" instead of "7.4 or newer")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Good job! No executable or dangerous file extensions detected18,009 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript68138214,059
TypeScript34993,4683,438
PHP15036263
HTML1330248
CSS1061

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions13
▷ Named functions1076.92%
▷ Anonymous functions323.08%
Constants0
▷ Global constants00.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
2 PNG files occupy 0.31MB with 0.18MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/Marketing-Insights-Loading-Screen.png178.47KB68.79KB▼ 61.45%
img/Error-Loading-Modal.png135.15KB59.12KB▼ 56.26%