68% bea-media-analytics

Code Review | BEA - Media Analytics

WordPress plugin BEA - Media Analytics scored68%from 54 tests.

About plugin

  • Plugin page: bea-media-analytics
  • Plugin version: 2.1.3
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-6.2.4
  • WordPress version: 6.3.1
  • First release: Feb 4, 2018
  • Latest release: Nov 2, 2023
  • Number of updates: 22
  • Update frequency: every 95.4 days
  • Top authors: MaximeCulea (90.91%)beapi (13.64%)

Code review

54 tests

User reviews

3 reviews

Install metrics

70+ active /5,284 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼0.56ms] Passed 4 tests

Analyzing server-side resources used by BEA - Media Analytics
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1138.18 ▼0.43
Dashboard /wp-admin3.44 ▲0.1347.78 ▲0.03
Posts /wp-admin/edit.php3.49 ▲0.1344.76 ▼3.61
Add New Post /wp-admin/post-new.php6.04 ▲0.16113.80 ▲18.66
Media Library /wp-admin/upload.php3.36 ▲0.1335.72 ▲1.79

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 56 new files
Database: 1 new table, 6 new options
New tables
wp_bea_media_analytics
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for BEA - Media Analytics
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲4314.74 ▲0.151.80 ▲0.1243.69 ▲0.36
Dashboard /wp-admin2,213 ▲365.63 ▼0.2290.10 ▼10.4941.51 ▼4.91
Posts /wp-admin/edit.php2,118 ▲182.05 ▲0.0936.40 ▼2.7331.76 ▼9.72
Add New Post /wp-admin/post-new.php1,536 ▲1023.78 ▲0.11684.42 ▲27.8261.34 ▲14.19
Media Library /wp-admin/upload.php1,417 ▲174.26 ▲0.05102.86 ▲2.2845.07 ▼0.40

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • Zombie tables detected upon uninstall: 1 table
    • wp_bea_media_analytics
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% 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 0% 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 perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/bea-media-analytics/bea-media-analytics.php
  • 24× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Trait 'BEA\\Media_Analytics\\Singleton' not found in wp-content/plugins/bea-media-analytics/classes/addons/content-sync-fusion/main.php on line 6
    • > PHP Fatal error
      Trait 'BEA\\Media_Analytics\\Singleton' not found in wp-content/plugins/bea-media-analytics/classes/plugin.php on line 3
    • > PHP Fatal error
      Trait 'BEA\\Media_Analytics\\Singleton' not found in wp-content/plugins/bea-media-analytics/classes/addons/main.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_List_Table' not found in wp-content/plugins/bea-media-analytics/classes/admin/admin-media-list-table.php:3
    • > PHP Fatal error
      Trait 'BEA\\Media_Analytics\\Singleton' not found in wp-content/plugins/bea-media-analytics/classes/api/json.php on line 6
    • > PHP Fatal error
      Trait 'BEA\\Media_Analytics\\Singleton' not found in wp-content/plugins/bea-media-analytics/classes/db-table.php on line 3
    • > PHP Fatal error
      Trait 'BEA\\Media_Analytics\\Singleton' not found in wp-content/plugins/bea-media-analytics/classes/admin/option.php on line 7
    • > PHP Fatal error
      Uncaught Error: Class 'BEA\\Media_Analytics\\Helper\\Helper' not found in wp-content/plugins/bea-media-analytics/classes/helper/post.php:5
    • > PHP Fatal error
      Trait 'BEA\\Media_Analytics\\Singleton' not found in wp-content/plugins/bea-media-analytics/classes/main.php on line 5
    • > PHP Fatal error
      Trait 'BEA\\Media_Analytics\\Singleton' not found in wp-content/plugins/bea-media-analytics/classes/api/query.php on line 6

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
5 plugin tags: find, find media, analytics, usage, media

bea-media-analytics/bea-media-analytics.php 85% from 13 tests

Analyzing the main PHP file in "BEA - Media Analytics" version 2.1.3
It is important to fix the following:
  • Domain Path: The domain path should use only dashes and lowercase characters ("languages")
  • Domain Path: Prefix the domain path with a forward slash character ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
No dangerous file extensions were detected2,465 lines of code in 49 files:
LanguageFilesBlank linesComment linesLines of code
PHP436861,8642,201
PO File13234133
JSON20068
Markdown120034
JavaScript21029

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity10.00
▷ Minimum class complexity1.00
▷ Maximum class complexity48.00
Average method complexity2.73
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces10
Interfaces0
Traits1
Classes33
▷ Abstract classes00.00%
▷ Concrete classes33100.00%
▷ Final classes13.03%
Methods179
▷ Static methods5530.73%
▷ Public methods13977.65%
▷ Protected methods2312.85%
▷ Private methods179.50%
Functions10
▷ Named functions550.00%
▷ Anonymous functions550.00%
Constants7
▷ Global constants571.43%
▷ Class constants228.57%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin