83% xt-easy-google-adsense-injection

Code Review | XT-Easy-Google-Adsense-Injection

WordPress plugin XT-Easy-Google-Adsense-Injection scored83%from 54 tests.

About plugin

  • Plugin page: xt-easy-google-ad...
  • Plugin version: v1.0...
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.2
  • WordPress version: 6.3.1
  • First release: May 23, 2015
  • Latest release: May 23, 2015
  • Number of updates: 5
  • Update frequency: every 0.2 days
  • Top authors: cjbmeb14 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /2,323 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
This plugin's installer ran successfully

Server metrics [RAM: ▼0.01MB] [CPU: ▼6.57ms] Passed 4 tests

Server-side resources used by XT-Easy-Google-Adsense-Injection
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.02 ▲1.84
Dashboard /wp-admin3.31 ▼0.0344.58 ▼14.48
Posts /wp-admin/edit.php3.36 ▲0.0146.25 ▼2.50
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.52 ▼11.12
Media Library /wp-admin/upload.php3.23 ▲0.0036.17 ▲4.82

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by XT-Easy-Google-Adsense-Injection
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,805 ▲5914.17 ▼0.181.80 ▲0.1143.59 ▲2.50
Dashboard /wp-admin2,214 ▲405.63 ▲0.1186.02 ▼2.5737.60 ▼3.68
Posts /wp-admin/edit.php2,113 ▲131.95 ▼0.0335.90 ▼6.0335.29 ▼0.45
Add New Post /wp-admin/post-new.php1,539 ▲1323.21 ▲0.01662.32 ▲5.4753.25 ▲0.97
Media Library /wp-admin/upload.php1,419 ▲224.28 ▲0.0795.01 ▼8.2844.75 ▼0.66

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not 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
The following issues need your attention
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/xt-easy-google-adsense-injection/WP-Simple-Adsense-Insertion.php:23

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 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
Please fix the following attributes:
  • Tags: There are too many tags (13 tag instead of maximum 10)
You can look at the official readme.txt

xt-easy-google-adsense-injection/WP-Simple-Adsense-Insertion.php 77% from 13 tests

The main PHP file in "XT-Easy-Google-Adsense-Injection" ver. v1.0... adds more information about the plugin and also serves as the entry point for this plugin
The following require your attention:
  • Description: Please don't use more than 140 characters for the plugin description (currently 208 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("xt-easy-google-adsense-injection.php" instead of "WP-Simple-Adsense-Insertion.php")
  • Version: The version number should be digits and periods (ex. "1.0.3" instead of "v1.0...")

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

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 PNG files occupy 1.04MB with 0.74MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-4.png453.29KB131.62KB▼ 70.96%
screenshot-1.png417.29KB124.55KB▼ 70.15%
screenshot-2.png158.96KB49.41KB▼ 68.92%
screenshot-3.png38.93KB10.07KB▼ 74.14%