90% better-adsense

Code Review | Better AdSense

WordPress plugin Better AdSense scored90%from 54 tests.

About plugin

  • Plugin page: better-adsense
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7.1
  • WordPress version: 6.3.1
  • First release: Jan 19, 2017
  • Latest release: Feb 1, 2017
  • Number of updates: 17
  • Update frequency: every 0.4 days
  • Top authors: pmysiak (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /979 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.09MB] [CPU: ▼8.04ms] Passed 4 tests

This is a short check of server-side resources used by Better AdSense
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1039.08 ▼3.38
Dashboard /wp-admin3.38 ▲0.0845.76 ▼2.91
Posts /wp-admin/edit.php3.49 ▲0.1448.94 ▼2.00
Add New Post /wp-admin/post-new.php5.98 ▲0.1085.29 ▼23.85
Media Library /wp-admin/upload.php3.30 ▲0.0836.00 ▲2.01

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

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

Browser metrics Passed 4 tests

Better AdSense: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲8513.25 ▼1.121.74 ▼0.2744.64 ▼2.44
Dashboard /wp-admin2,229 ▲445.86 ▼0.02102.47 ▼1.7438.50 ▼4.01
Posts /wp-admin/edit.php2,112 ▲232.00 ▼0.0435.34 ▼6.5833.28 ▼4.22
Add New Post /wp-admin/post-new.php1,531 ▼317.64 ▼5.47670.87 ▲76.4255.19 ▲3.59
Media Library /wp-admin/upload.php1,402 ▲204.21 ▲0.0193.55 ▼5.1442.87 ▼0.43

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Zombie WordPress options were found after uninstall: 11 options
    • widget_2
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_3
    • can_compress_scripts
    • widget_4
    • widget_recent-posts
    • db_upgraded
    • widget_5
    • ...

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

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The SRP test was a success

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
7 plugin tags: google adsense, ad manager, advertising, ads, adsense...

better-adsense/better-adsense.php Passed 13 tests

This is the main PHP file of "Better AdSense" version 1.0.6, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
100 characters long description:
Wordpress Adsense plugin with responsive units support. Now you can earn more money with our plugin.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected397 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP610176269
CSS1200115
JavaScript11013

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.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
No PNG files were detected