94% adsense-button

Code Review | adsensebutton

WordPress plugin adsensebutton scored 94% from 54 tests.

About plugin

  • Plugin page: adsense-button
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 5.8.1
  • First release: May 7, 2013
  • Latest release: May 13, 2013
  • Number of updates: 18
  • Update frequency: every 1.1 days
  • Top authors: ynizon (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 931 total downloads


Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

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

Server-side resources used by adsensebutton
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.0023.54 ▲0.38
Dashboard /wp-admin3.09 ▲0.0232.50 ▼4.06
Posts /wp-admin/edit.php3.14 ▲0.0331.20 ▼0.51
Add New Post /wp-admin/post-new.php5.45 ▲0.0167.97 ▼578.47
Media Library /wp-admin/upload.php3.03 ▲0.0327.01 ▲5.06

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 8 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for adsensebutton
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,686 ▲8515.68 ▲0.085.51 ▼1.2676.67 ▲0.94
Dashboard /wp-admin2,947 ▲516.16 ▼0.06114.66 ▼14.26161.23 ▼17.38
Posts /wp-admin/edit.php2,758 ▲183.25 ▲0.0166.55 ▲0.93139.30 ▼3.37
Add New Post /wp-admin/post-new.php3,748 ▼6518.63 ▼0.31441.70 ▲16.25158.79 ▼7.82
Media Library /wp-admin/upload.php1,772 ▲205.52 ▼0.02144.73 ▼9.56185.31 ▲7.62

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/adsense-button/adsensebutton.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test


Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
1 plugin tags: adsense

adsense-button/adsensebutton.php 92% from 13 tests

The main file in "adsensebutton" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("adsense-button.php" instead of "adsensebutton.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin191 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code

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.32
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity2.80
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and 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
inc/ressources/images/adsensebutton.png3.24KB0.43KB▼ 86.72%