78% goo-page-level-ads

Code Review | Goo Page Level Ads

WordPress plugin Goo Page Level Ads scored78%from 54 tests.

About plugin

  • Plugin page: goo-page-level-ads
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.5.2
  • WordPress version: 6.3.1
  • First release: Jun 15, 2016
  • Latest release: Jun 15, 2016
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: Gunar (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /3,030 total downloads

Benchmarks

Plugin footprint 82% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼9.05ms] 75% from 4 tests

An overview of server-side resources used by Goo Page Level Ads
Please have a look at the following items
  • CPU: Total CPU usage must kept under 500.00ms (currently 840.52ms on /wp-admin/admin.php?page=goo-tools-plugin-settings)
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.38 ▼2.48
Dashboard /wp-admin3.35 ▲0.0150.46 ▼8.38
Posts /wp-admin/edit.php3.41 ▲0.0548.71 ▲2.56
Add New Post /wp-admin/post-new.php5.93 ▲0.0581.74 ▼26.69
Media Library /wp-admin/upload.php3.28 ▲0.0537.36 ▲1.35
Goo Page Level Ads /wp-admin/admin.php?page=goo-pagelevelads-plugin-settings3.2430.73
Goo Tools Plugins /wp-admin/admin.php?page=goo-tools-plugin-settings3.27840.52

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
widget_recent-comments
can_compress_scripts
goopagelevelads_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Goo Page Level Ads
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲5514.04 ▼0.311.78 ▲0.1743.06 ▲1.03
Dashboard /wp-admin2,225 ▲485.58 ▼0.0997.43 ▲11.9243.00 ▲2.79
Posts /wp-admin/edit.php2,124 ▲241.98 ▼0.0134.12 ▼2.5436.76 ▲3.99
Add New Post /wp-admin/post-new.php1,552 ▲2123.13 ▲0.21692.45 ▲31.2553.77 ▲0.14
Media Library /wp-admin/upload.php1,427 ▲274.18 ▲0.0997.66 ▼11.7740.55 ▼4.77
Goo Page Level Ads /wp-admin/admin.php?page=goo-pagelevelads-plugin-settings8932.0021.8026.82
Goo Tools Plugins /wp-admin/admin.php?page=goo-tools-plugin-settings8261.9923.7424.04

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • goopagelevelads_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Please fix the following server-side errors
    • > GET request to /wp-admin/admin.php?page=goo-tools-plugin-settings
    • > Warning in wp-content/plugins/goo-page-level-ads/goo_tools.php+35
    Invalid argument supplied for foreach()

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 3× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/goo-page-level-ads/goo-page-level-ads.php
    • > /wp-content/plugins/goo-page-level-ads/admin.php
    • > /wp-content/plugins/goo-page-level-ads/goo_tools.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots do not have images: #1 (Plugin settings page), #2 (AdSense test message)
The official readme.txt is a good inspiration

goo-page-level-ads/goo-page-level-ads.php Passed 13 tests

"Goo Page Level Ads" version 1.1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
85 characters long description:
This plugin insert Google AdSense Page Level Ads code into HEAD section of every page

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
Everything looks great! No dangerous files found in this plugin387 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP36622299
CSS113079
JavaScript1009

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity7.00
▷ Minimum class complexity7.00
▷ Maximum class complexity7.00
Average method complexity2.20
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods360.00%
▷ Protected methods00.00%
▷ Private methods240.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
7 PNG files occupy 0.04MB with 0.02MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/logo_bb.png6.27KB4.06KB▼ 35.29%
admin/r_dot.png0.16KB0.14KB▼ 8.07%
admin/b_dot.png0.19KB0.14KB▼ 25.25%
screenshot-1.png18.36KB8.93KB▼ 51.33%
admin/stared_m.png9.19KB4.00KB▼ 56.51%