84% simple-google-adsense

Code Review | Simple Google AdSense - Simple & Best Google AdSense Plugin for WordPress

WordPress plugin Simple Google AdSense - Simple & Best Google AdSense Plugin for WordPress scored 84% from 54 tests.

About plugin

  • Plugin page: simple-google-ads...
  • 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: Apr 30, 2019
  • Latest release: Jul 22, 2023
  • Number of updates: 15
  • Update frequency: every 102.9 days
  • Top authors: mantrabrain (100%)

Code review

54 tests

User reviews

1 review

Install metrics

4,000+ active / 50,401 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.10MB] [CPU: ▼6.13ms] Passed 4 tests

An overview of server-side resources used by Simple Google AdSense - Simple & Best Google AdSense Plugin for WordPress
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0434.10 ▼11.45
Dashboard /wp-admin3.50 ▲0.20104.50 ▲56.82
Posts /wp-admin/edit.php3.52 ▲0.1649.07 ▼3.02
Add New Post /wp-admin/post-new.php5.98 ▲0.1090.60 ▼10.56
Media Library /wp-admin/upload.php3.32 ▲0.1036.02 ▲0.52
Google AdSense /wp-admin/options-general.php?page=simple-google-adsense-settings3.2934.98

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Simple Google AdSense - Simple & Best Google AdSense Plugin for WordPress
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,902 ▲14513.20 ▼0.751.54 ▼0.8440.82 ▼6.31
Dashboard /wp-admin2,305 ▲1174.88 ▼0.04109.54 ▲3.2541.26 ▼1.20
Posts /wp-admin/edit.php2,133 ▲442.03 ▲0.0341.30 ▼0.2541.61 ▲5.98
Add New Post /wp-admin/post-new.php1,573 ▲4523.36 ▲4.94689.29 ▲41.0854.62 ▼2.55
Media Library /wp-admin/upload.php1,429 ▲384.22 ▼0.0295.22 ▼3.7445.07 ▼1.17
Google AdSense /wp-admin/options-general.php?page=simple-google-adsense-settings8172.0624.7527.22

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Good news, no errors were detected

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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/simple-google-adsense/includes/admin/dashboard/class-mantrabrain-admin-dashboard.php:122

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)
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
3 plugin tags: google ad, adsense, google

simple-google-adsense/simple-google-adsense.php 92% from 13 tests

Analyzing the main PHP file in "Simple Google AdSense - Simple & Best Google AdSense Plugin for WordPress" version 1.0.11
It is important to fix the following:
  • Domain Path: The domain path folder was not found ("/languages")

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
Good job! No executable or dangerous file extensions detected565 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP6210338565

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.30
Average class complexity10.20
▷ Minimum class complexity3.00
▷ Maximum class complexity21.00
Average method complexity2.07
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes360.00%
Methods43
▷ Static methods511.63%
▷ Public methods3274.42%
▷ Protected methods511.63%
▷ Private methods613.95%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants964.29%
▷ Class constants535.71%
▷ Public constants5100.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
No PNG images were found in this plugin