89% ultimate-adsense

Code Review | Ultimate Google Adsense

WordPress plugin Ultimate Google Adsense scored 89% from 54 tests.

About plugin

  • Plugin page: ultimate-adsense
  • Plugin version: 1.0.3
  • PHP compatiblity: 6.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.8
  • WordPress version: 6.3.1
  • First release: Feb 19, 2020
  • Latest release: Jul 22, 2021
  • Number of updates: 18
  • Update frequency: every 28.8 days
  • Top authors: themebing (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active / 1,559 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Ultimate Google Adsense
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.81 ▲1.92
Dashboard /wp-admin3.32 ▲0.0245.27 ▼2.21
Posts /wp-admin/edit.php3.37 ▲0.0246.22 ▼5.11
Add New Post /wp-admin/post-new.php5.90 ▲0.0288.51 ▼11.94
Media Library /wp-admin/upload.php3.25 ▲0.0234.13 ▼2.43

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

Checking browser requirements for Ultimate Google Adsense
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,811 ▲7613.30 ▼1.331.74 ▲0.0844.41 ▲3.21
Dashboard /wp-admin2,220 ▲325.82 ▼0.2295.96 ▼15.1672.56 ▲26.73
Posts /wp-admin/edit.php2,100 ▲112.02 ▼0.0432.75 ▼8.9831.43 ▼3.95
Add New Post /wp-admin/post-new.php1,524 ▼1823.15 ▲5.12716.40 ▲102.8548.16 ▼5.03
Media Library /wp-admin/upload.php1,399 ▲114.20 ▼0.0093.85 ▼14.1972.63 ▲27.93

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
The SRP test was a success

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 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Sample of Adsense applied)
You can take inspiration from this readme.txt

ultimate-adsense/google-adsense-ultimate.php 85% from 13 tests

The primary PHP file in "Ultimate Google Adsense" version 1.0.3 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: Name the main plugin file the same as the plugin slug ("ultimate-adsense.php" instead of "google-adsense-ultimate.php")

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

PHP code Passed 2 tests

This is a very shot 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.20
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.40
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/images/adsense-logo.png1.88KB0.96KB▼ 49.02%