90% dco-insert-analytics-code

Code Review | DCO Insert Analytics Code

WordPress plugin DCO Insert Analytics Code scored 90% from 54 tests.

About plugin

  • Plugin page: dco-insert-analyt...
  • Plugin version: 1.1.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: Jan 16, 2016
  • Latest release: Jul 28, 2021
  • Number of updates: 29
  • Update frequency: every 69.7 days
  • Top authors: denisco (100%)

Code review

54 tests

User reviews

8 reviews

Install metrics

7,000+ active / 34,982 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.45ms] Passed 4 tests

Analyzing server-side resources used by DCO Insert Analytics Code
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0136.81 ▼3.07
Dashboard /wp-admin3.33 ▲0.0346.83 ▼0.84
Posts /wp-admin/edit.php3.44 ▲0.0944.90 ▼3.63
Add New Post /wp-admin/post-new.php5.91 ▲0.0292.24 ▼5.80
Media Library /wp-admin/upload.php3.25 ▲0.0233.21 ▼1.31
DCO Insert Analytics Code /wp-admin/options-general.php?page=dco-insert-analytics-code3.2232.14

Server storage [IO: ▲0.02MB] [DB: ▲0.07MB] Passed 3 tests

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

Browser metrics Passed 4 tests

An overview of browser requirements for DCO Insert Analytics Code
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,829 ▲7213.25 ▼1.111.85 ▼0.2040.31 ▲0.19
Dashboard /wp-admin2,210 ▲185.83 ▲0.88105.38 ▼8.8544.10 ▼5.12
Posts /wp-admin/edit.php2,093 ▲42.03 ▲0.0439.78 ▲0.0534.91 ▲0.39
Add New Post /wp-admin/post-new.php1,536 ▼723.30 ▲4.84616.86 ▲9.1050.87 ▼1.65
Media Library /wp-admin/upload.php1,392 ▲14.23 ▲0.0298.49 ▼4.0542.61 ▼1.65
DCO Insert Analytics Code /wp-admin/options-general.php?page=dco-insert-analytics-code9122.0725.4428.29

Uninstaller [IO: ▲0.00MB] [DB: ▲0.07MB] 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-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 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 Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
4 plugin tags: analytics, metrika, yandex metrica, google analytics

dco-insert-analytics-code/dco-insert-analytics-code.php Passed 13 tests

Analyzing the main PHP file in "DCO Insert Analytics Code" version 1.1.3
102 characters long description:
Allows you to insert analytics code before </head> or after <body> or before </body>

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin199 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP457259199

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity6.33
▷ Minimum class complexity4.00
▷ Maximum class complexity10.00
Average method complexity1.84
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods19
▷ Static methods00.00%
▷ Public methods19100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin