78% universal-ads

Code Review | Zedna Universal Ads

WordPress plugin Zedna Universal Ads scored 78% from 54 tests.

About plugin

  • Plugin page: universal-ads
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-5.4
  • WordPress version: 6.3.1
  • First release: Mar 11, 2016
  • Latest release: Mar 12, 2020
  • Number of updates: 22
  • Update frequency: every 66.9 days
  • Top authors: zedna (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 1,324 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼2.41ms] Passed 4 tests

An overview of server-side resources used by Zedna Universal Ads
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0441.55 ▼0.49
Dashboard /wp-admin3.35 ▲0.0546.09 ▲1.64
Posts /wp-admin/edit.php3.40 ▲0.0445.45 ▼5.81
Add New Post /wp-admin/post-new.php5.93 ▲0.0484.00 ▲1.22
Media Library /wp-admin/upload.php3.27 ▲0.0430.97 ▼4.55

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 10 new files
Database: no new tables, 7 new options
New WordPress options
widget_googleads_widget_universal
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

Zedna Universal Ads: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲6914.74 ▲0.381.98 ▲0.3139.23 ▼6.69
Dashboard /wp-admin2,221 ▲335.85 ▼0.0594.22 ▼11.5669.59 ▲31.97
Posts /wp-admin/edit.php2,101 ▲91.98 ▼0.0732.85 ▼6.6234.11 ▼3.02
Add New Post /wp-admin/post-new.php1,536 ▲2218.43 ▲0.92666.49 ▼36.1759.27 ▲5.80
Media Library /wp-admin/upload.php1,403 ▲154.17 ▼0.0294.42 ▼12.7875.08 ▲28.81

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_googleads_widget_universal
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 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
Please fix the following items
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/universal-ads/google_ads_widget.php
    • > /wp-content/plugins/universal-ads/google_ads_widget_include.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/universal-ads/gau.php:16

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

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: responsive, adsense, shortcode, google

universal-ads/gau.php 85% from 13 tests

The entry point to "Zedna Universal Ads" version 1.0 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("universal-ads.php" instead of "gau.php")
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 172 characters long)

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
Everything looks great! No dangerous files found in this plugin203 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31764203

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity11.00
▷ Minimum class complexity11.00
▷ Maximum class complexity11.00
Average method complexity3.50
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions6
▷ Named functions583.33%
▷ Anonymous functions116.67%
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
6 PNG files occupy 0.33MB with 0.20MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/icon-128x128.png8.18KB4.41KB▼ 46.18%
img/gau-ico.png1.55KB0.72KB▼ 53.75%
assets/screenshot-1.PNG253.11KB66.11KB▼ 73.88%
assets/icon-256x256.png32.89KB11.09KB▼ 66.29%
assets/banner-772x250.png41.13KB15.97KB▼ 61.16%