89% easy-google-adsense

Code Review | Easy Google AdSense

WordPress plugin Easy Google AdSense scored89%from 54 tests.

About plugin

  • Plugin page: easy-google-adsense
  • Plugin version: 1.0.11
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3
  • WordPress version: 6.3.1
  • First release: Feb 23, 2018
  • Latest release: Sep 11, 2023
  • Number of updates: 26
  • Update frequency: every 77.9 days
  • Top authors: naa986 (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

8,000+ active /176,194 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.05MB] [CPU: ▼3.53ms] Passed 4 tests

An overview of server-side resources used by Easy Google AdSense
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0541.36 ▲4.16
Dashboard /wp-admin3.37 ▲0.0246.03 ▼15.61
Posts /wp-admin/edit.php3.48 ▲0.1246.95 ▲3.50
Add New Post /wp-admin/post-new.php5.95 ▲0.0692.79 ▼3.97
Media Library /wp-admin/upload.php3.29 ▲0.0635.66 ▲1.98
Easy Google AdSense /wp-admin/options-general.php?page=easy-google-adsense-settings3.2530.15

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 6 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Easy Google AdSense
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5814.69 ▲0.311.79 ▲0.0543.68 ▲4.10
Dashboard /wp-admin2,213 ▲224.83 ▼1.05108.49 ▲4.2242.77 ▲1.09
Posts /wp-admin/edit.php2,090 ▲12.04 ▲0.0139.71 ▲3.0335.40 ▲0.18
Add New Post /wp-admin/post-new.php1,517 ▼217.68 ▼5.62673.91 ▲64.6453.69 ▲0.65
Media Library /wp-admin/upload.php1,395 ▲74.23 ▲0.0598.78 ▲0.6343.27 ▼1.38
Easy Google AdSense /wp-admin/options-general.php?page=easy-google-adsense-settings8182.0325.3228.00

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP Passed 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
Everything seems fine, however this is by no means an exhaustive test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

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
5 plugin tags: ads, adsense, google, ad manager, google adsense

easy-google-adsense/main.php 85% from 13 tests

The primary PHP file in "Easy Google AdSense" version 1.0.11 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 ("easy-google-adsense.php" instead of "main.php")
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Good job! No executable or dangerous file extensions detected336 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP23115302
CSS10034

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.33
Average class complexity42.00
▷ Minimum class complexity42.00
▷ Maximum class complexity42.00
Average method complexity4.15
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
addons/images/ega-no-ads-wp-users.png2.12KB1.28KB▼ 39.41%
addons/images/ega-bottom-anchor-ads.png2.62KB1.76KB▼ 32.97%