84% demomentsomtres-wp-admin-gtm

Code Review | DeMomentSomTres WP Admin GTM

WordPress plugin DeMomentSomTres WP Admin GTM scored84%from 54 tests.

About plugin

  • Plugin page: demomentsomtres-w...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.4
  • WordPress version: 6.3.1
  • First release: Apr 28, 2015
  • Latest release: Nov 30, 2015
  • Number of updates: 4
  • Update frequency: every 62.3 days
  • Top authors: marcqueralt (100%)

Code review

54 tests

User reviews

1 review

Install metrics

50+ active /1,494 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.01MB] [CPU: ▼0.61ms] Passed 4 tests

Server-side resources used by DeMomentSomTres WP Admin GTM
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0133.74 ▼3.74
Dashboard /wp-admin3.32 ▲0.0145.50 ▲0.02
Posts /wp-admin/edit.php3.37 ▲0.0147.69 ▲2.70
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.63 ▲0.19
Media Library /wp-admin/upload.php3.24 ▲0.0136.02 ▲1.08

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

DeMomentSomTres WP Admin GTM: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,806 ▲6013.54 ▼1.011.62 ▼0.1041.42 ▲3.94
Dashboard /wp-admin2,212 ▲275.85 ▼0.00106.46 ▼10.8543.86 ▼0.05
Posts /wp-admin/edit.php2,095 ▲31.96 ▼0.0540.08 ▼1.4237.84 ▲2.02
Add New Post /wp-admin/post-new.php1,520 ▼217.74 ▼5.44675.01 ▲70.6650.34 ▼2.67
Media Library /wp-admin/upload.php1,388 ▲34.18 ▼0.0396.65 ▼9.1945.39 ▲0.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/demomentsomtres-wp-admin-gtm/demomentsomtres-wp-admin-gtm.php

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 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
10 plugin tags: analytics, remarketing, google tag manager, google analytics, google...

demomentsomtres-wp-admin-gtm/demomentsomtres-wp-admin-gtm.php Passed 13 tests

The entry point to "DeMomentSomTres WP Admin GTM" version 1.0 is a PHP file that has certain tags in its header comment area
50 characters long description:
Include GTM tracking code on WP Admin and WP Login

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
There were no executable files found in this plugin46 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1111846

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.25
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants150.00%
▷ Class constants150.00%
▷ Public constants1100.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
There are no PNG files in this plugin